Commit Graph

4313 Commits

Author SHA1 Message Date
Johannes Schickel
bd82ebd080 WINCE: Run astyle over WinCE source files. 2011-03-09 03:02:46 +01:00
Johannes Schickel
438f2b2e1b WINCE: Cleanup WinCE event source a bit. 2011-03-09 02:49:22 +01:00
Johannes Schickel
b0cd614fd5 WINCE: Silence/fix some warnings. 2011-03-08 20:23:31 +01:00
Johannes Schickel
aebd9c6ea0 WINCE: Run astyle over WinCE related event and graphics source files. 2011-03-08 19:49:10 +01:00
Johannes Schickel
fe89ffe80a WINCE: Add -fno-inline-functions to compiler arguments.
WinCE is using -O3 by default, which includes -finline-functions, which in turn
breaks SCI. By disabling that opimization we get SCI working fine again.
2011-03-08 18:16:36 +01:00
Max Horn
aa452d3aeb WINCE: Make scummvm compile and run again for WinCE platform (patch #3202337) 2011-03-08 12:53:41 +01:00
dhewg
905d5e76b4 ANDROID: Move misplaced assert
Leftover from the recently introduced 16bit support
2011-03-07 23:42:20 +01:00
dhewg
e71fb5b0eb ANDROID: Move the overlay initialization
There's no point in doing that in initSize() every time
2011-03-07 23:42:20 +01:00
dhewg
1f90d232e3 ANDROID: Save the game when the process is paused
The OS can kill the activity at will after onPause() or onStop()
to free up memory for other application. Provide a parachute when
the engine allows it.
2011-03-07 19:56:29 +01:00
dhewg
42c6a785c7 ANDROID: Texture cleanup 2011-03-07 19:56:29 +01:00
dhewg
0b24fc3acc OPENGL: Fix compilation for --disable-16bit 2011-03-06 16:59:20 +01:00
dhewg
433429dcf4 ANDROID: Fix warning 2011-03-05 23:56:25 +01:00
dhewg
12fb817751 ANDROID: Fix 16bit cursors
I hate this code
2011-03-05 23:08:42 +01:00
dhewg
53ee7c5513 ANDROID: Proper fillBuffer() for non CLUT8 colors 2011-03-05 23:08:41 +01:00
dhewg
a2c02367f7 ANDROID: Rename function for less confusion 2011-03-05 23:08:41 +01:00
dhewg
d2dd614996 ANDROID: Clear screen on initSize() 2011-03-05 18:47:05 +01:00
dhewg
94db3403a3 ANDROID: Add initial 16bit gfx support
Supported pixel formats: 565, 5551, 4444
Missing: 555 (doesn't exist on GLES)
2011-03-05 18:47:05 +01:00
dhewg
83b00526d0 ANDROID: Reduce mem usage of fillBuffer() 2011-03-05 11:00:36 +01:00
dhewg
4ee0a9f43a ANDROID: Merge updateTexture() 2011-03-05 11:00:36 +01:00
dhewg
68378150be ANDROID: Remove some vtable overhead on textures 2011-03-05 11:00:36 +01:00
dhewg
a913d360f2 ANDROID: Clear game texture on initSize()
Gets rid of leftovers
2011-03-04 21:41:55 +01:00
dhewg
f639466ab2 ANDROID: Cleanup 2011-03-04 21:36:48 +01:00
dhewg
1b0d4724f4 ANDROID: Fix slightly off while loop
CursorMan allows to push cursors with a width/height of zero. If such a
cursor is restored, we don't need to call glTexSubImage2D() 0xffffffff
times... This fixes delays of multiple minutes when closing GMM
on groovie and sword.
Also, I want that last hour of my life back.
2011-03-04 21:35:30 +01:00
dhewg
ce9796baa3 ANDROID: Don't wipe paletted textures on reinit
The content of a paletted texture is in _surface.pixels. When recreating
the surface, don't wipe its data unnecessarily. This fixes gfx garbage
on CLUT8 games/cursors when leaving and going back to ScummVM
2011-03-03 21:29:47 +01:00
dhewg
7157454e9b ANDROID: Implement surface resizes
Split surface code into helper functions to avoid code duplication, and
distinguish between screen resizes and surface recreation. The former
happens when toggling the softkeyb, where we just have to reset the
viewport. Fixes garbled textures in those cases.
2011-03-03 21:29:15 +01:00
dhewg
3df060b656 ANDROID: Rename member vars according to our style 2011-03-03 20:47:32 +01:00
dhewg
a7a7542d1d ANDROID: Remove an indirection when pausing 2011-03-03 20:47:27 +01:00
dhewg
1e3c96b3ef ANDROID: Formatting/whitespaces 2011-03-03 20:46:49 +01:00
dhewg
719d22918d ANDROID: Respect the pause level. 2011-03-02 23:41:59 +01:00
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
Johannes Schickel
5ffecd85b3 OPENGL: Limit maximum cursor scale.
This avoids too big cursors when the screen resolution is really high.
2011-03-01 05:45:56 +01:00
Johannes Schickel
4841079075 OPENGL(SDL): Use the whole window/screen size for the overlay.
This makes the overlay looking nicer in fullscreen mode.
2011-03-01 05:32:14 +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