Commit graph

2051 commits

Author SHA1 Message Date
dhewg
2d4a64d184 ANDROID: Properly release texture resources
When calling glDeleteTextures() we need a valid surface.
2011-03-02 23:18:36 +01:00
dhewg
c2d4cce429 ANDROID: On pause, put all threads in a coma
Since not every engine respects pauseEngine(), or they're in a state
where it simply gets ignored, put all threads in a group coma. Without
this, code still kept looping and wasting cpu cycles, while the user
might want to do use her/his droid for something else.
2011-03-02 23:18:35 +01:00
dhewg
25ef065a41 ANDROID: Implement pause/resume
Don't just kill the whole process when the Activity is stopped. Instead,
use its events to pause or resume audio and the running engine (if any).
Of course not every engines implements that... but at least an incoming
call doesn't kill the game now (lol).
2011-03-02 23:18:35 +01:00
dhewg
ccfe427eb5 ANDROID: Check for a surface in updateScreen() 2011-03-02 23:18:35 +01:00
dhewg
d6e838e1b3 ANDROID: Merge FIND_METHODs 2011-03-02 23:18:35 +01:00
dhewg
82a9beff2b ANDROID: Move swapBuffers to the native side 2011-03-02 23:18:34 +01:00
dhewg
bd7e3e9bb2 ANDROID: cleanup 2011-03-02 23:18:34 +01:00
dhewg
2333a32697 ANDROID: Untangle JNI interweaving
- make the startup sequence more linear
- use SurfaceHolder events
- get rid of the surface lock
- remove unnecessary JNI calls
- make the ScummVM class implement Runnable
- cleanup
2011-03-02 23:18:34 +01:00
dhewg
2f008d0cd6 ANDROID: Don't use warning() in JNI functions 2011-03-02 23:18:33 +01:00
dhewg
807971f8af ANDROID: Don't use warning()/error() in a thread 2011-03-02 23:18:33 +01:00
dhewg
24a332bd22 ANDROID: Prevent AudioTrack unpause on startup 2011-02-27 14:15:47 +01:00
dhewg
72889ee24f ANDROID: Remove dead code 2011-02-27 14:15:47 +01:00
dhewg
a73b2ec972 ANDROID: Remove unnecessary code 2011-02-27 09:04:38 +01:00
dhewg
d4c0501d1f ANDROID: Check audio buffer for silence
Most games register a music channel, and when there is no music,
they still stream silence (and run through all the Converter::flow
code!). Scan the buffer for that to pause the AudioTrack. Ugly, but
worth it - reduces CPU usage on many games and hence saves battery life.
2011-02-27 09:04:37 +01:00
dhewg
0e869a5cf0 ANDROID: Pause the AudioTrack when possible
Only works in situations without any registered channels (or all paused)
at the mixer (like on the launcher or GMM).

CPU usage before (Galaxy Tab):
~5% scummvm
~15% mediaserver

After:
~2% scummvm
0% mediaserver

;)
2011-02-27 09:04:37 +01:00
dhewg
25d895b859 ANDROID: Rework audio system
Move the audio thread to the bright side
2011-02-27 09:04:36 +01:00
dhewg
983e16b36a ANDROID: Formatting 2011-02-27 09:04:31 +01:00
dhewg
6b1c575d1d ANDROID: Remove another weird workaround 2011-02-27 09:04:31 +01:00
dhewg
3fb85835a1 ANDROID: Allow softkeybd on all devices 2011-02-26 11:20:23 +01:00
dhewg
e06b7431e8 ANDROID: Remove weird workaround in clearScreen()
This resulted in flickering all over the GUI
2011-02-25 00:10:42 +01:00
dhewg
a636d41ca8 ANDROID: Check thread origin when debugging GL 2011-02-24 23:18:34 +01:00
dhewg
36135443b9 ANDROID: Disable zoning for now 2011-02-24 23:18:33 +01:00
dhewg
d8acbc0311 ANDROID: Deuglify overlay gfx
Use the native surface resolution of the device if its not too big.
If it is, use a clean scale factor of 2 to prevent eyecancer.
2011-02-24 23:18:33 +01:00
dhewg
867fa2696d ANDROID: Let's not do that on the stack 2011-02-24 23:18:33 +01:00
dhewg
0e9b4f3c50 ANDROID: We are not a text editor
This was probably set to ensure onCreateInputConnection() gets called,
but it is regardless of this flag. Now the soft keyboard doesn't show
up on startup on devices without physical keyboard, which prevents
unnecessary surface changes.
2011-02-24 23:18:32 +01:00
dhewg
53b5808d4f ANDROID: Move rest of everything JNI 2011-02-24 23:18:32 +01:00
dhewg
f80d993860 ANDROID: Wrap JNI code in a class 2011-02-24 23:18:32 +01:00
dhewg
c4706733d4 ANDROID: Move the global back reference to jni.cpp 2011-02-24 23:18:32 +01:00
dhewg
4af28f96ab ANDROID: Remove unused jmethod Object.wait() 2011-02-24 23:18:31 +01:00
dhewg
257913676d ANDROID: Split code into multiple files
And get rid of unnecessary JNI calls to get a pointer to g_system
2011-02-24 23:18:31 +01:00
Johannes Schickel
f3ea868cf6 SDL: Prevent graphics manager hotswapping on startup. (This time for real) 2011-02-24 23:04:34 +01:00
dhewg
273a324a71 SDL: Prevent unnecessary gfx manager hotswap 2011-02-24 20:24:58 +01:00
anotherguest
3194d2dac6 SYMBIAN: Changed sound path to audio.
Signed-off-by: anotherguest
2011-02-24 18:55:10 +01:00
dhewg
2f312e9e1a DS: Disable symbol garbage collection
Only applies when using loadable modules.
This requires a second compile run or black voodoo linker tricks.
Not implemented at this time. Disable it, so we get DS build failure
reports from buildbot (which are useful with all the DISABLE_EVERYTHING
defines).
The resulting binary might be too big to be usable.
2011-02-20 13:09:36 +01:00
dhewg
90fa5087dc ANDROID: Fix cursor scaling 2011-02-19 23:25:05 +01:00
dhewg
6c123974c0 ANDROID: Fix cursor when hotspot coords > 0 2011-02-19 23:24:59 +01:00
Johannes Schickel
e21d6e0d11 Merge branch 'osystem-palette' of https://github.com/lordhoto/scummvm into master
Conflicts:
	backends/platform/android/android.cpp
	engines/sci/graphics/screen.cpp
	engines/sci/graphics/transitions.cpp
2011-02-19 21:46:45 +01:00
dhewg
adf2225eb4 ANDROID: Move helper defines in a new header file
- added a few macros for convinience
- use them
- replaced CHECK_GL_ERROR with GLCALL
- spam GLCALL
2011-02-19 20:15:51 +01:00
dhewg
229e3ca5bf ANDROID: inline some GLESTexture members 2011-02-19 20:15:51 +01:00
dhewg
435069fe4a ANDROID: Supress warning 2011-02-19 20:15:50 +01:00
dhewg
feb0efe767 ANDROID: Formatting 2011-02-19 20:15:50 +01:00
dhewg
d7422de7f7 ANDROID: Fix make dependencies for parallel builds 2011-02-19 18:05:36 +01:00
dhewg
3a86b5f285 ANDROID: Remove outdated build instructions
See http://wiki.scummvm.org/index.php/Compiling_ScummVM/Android
2011-02-18 22:27:06 +01:00
dhewg
84e632cc9d ANDROID: Formatting
maybe now?
2011-02-18 21:38:26 +01:00
dhewg
106253b8b9 ANDROID: Formatting
and hoping for buildbot to pick up the toolchain now
2011-02-18 21:32:37 +01:00
dhewg
1b41de4ad8 ANDROID: dist target for buildbot 2011-02-18 20:18:13 +01:00
Marcus Comstedt
106380d481 DC: Don't use $(VER_REV) with git
It seems unlikely that git will ever be able to produce a $(VER_REV)
of 6 characters or less (the requirement for the version field in
IP.BIN), so don't even try to use it.
2011-02-18 20:12:16 +01:00
dhewg
8cddb2a401 Merge branch 'dhewg-android' 2011-02-18 17:18:27 +01:00
Fabio Battaglia
68e468ee01 N64: revert fix in svn r55745 and added a FIXME
The sign comparison fix requires a little more work than int->uint change, else it
throws an exception on the N64
2011-02-16 09:51:32 +01:00
Johannes Schickel
123f81f837 WII: Fix OSystem_Wii::setPalette after the ScummVM upstream merge in a024546.
I accidently removed two lines when doing the merge since I read the log
incorrectly. Thanks to dhewg for reporting this.
2011-02-16 00:52:52 +01:00