Fix two crashes on the emulator.

When running on the emulator don't attempt to perform any of the TTS
function as this will crash the application.
This commit is contained in:
Tigran Aivazian
2012-10-03 09:09:07 +01:00
parent 4da5138bbe
commit 35c423328e

View File

@@ -215,6 +215,9 @@ function InfoMessage:incrTTSspeed(direction) -- either +1 or -1
end
function InfoMessage:getTTSspeed()
if util.isEmulated() == 1 then
return 0
end
local tmp = io.popen('lipc-get-prop com.lab126.tts TtsISpeed', "r")
local speed = tmp:read("*number")
tmp:close()
@@ -234,6 +237,9 @@ function InfoMessage:incrSoundVolume(direction) -- either +1 or -1
end
function InfoMessage:getSoundVolume()
if util.isEmulated() == 1 then
return 0
end
local tmp = io.popen('lipc-get-prop com.lab126.audio Volume', "r")
local volume = tmp:read("*number")
tmp:close()