Commit Graph
6575 Commits
Author SHA1 Message Date
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 8add05f9b3 BASEBACKEND: Remove resetGraphicsScale() hack
All backends that derive from BaseBackend are consoles and/or portables
without any connection from graphics modes to scalers.
The default implementation of resetGraphicsScale() is now a noop, which
seems correct for all current backends.
This fixes unwanted mode changes since 93fdcbfa.
2011-02-26 10:55:27 +01:00
dhewg f26707e353 OPENGL: Fix 16bit cursors 2011-02-26 08:56:49 +01:00
dhewg a441069a49 OPENGL: Reset the scale on mode changes
Resets defaultTo1XScaler when going back to the launcher
2011-02-25 20:49:48 +01:00
Johannes Schickel 63cc9de1df OPENGL: Cleanup cursor refresh code a bit. 2011-02-25 04:04:56 +01:00
Johannes Schickel f1b16fe084 OPENGL: Implement support for non CLUT8 cursor.
Currently all the cursor data is converted to RGBA8888 to allow for
easy colorkeying.
2011-02-25 04:01:37 +01:00
Johannes Schickel 4f3a244f16 OPENGLSDL: Add RGB555 to the supported format list. 2011-02-25 03:36:45 +01:00
Johannes Schickel 972cdaea35 OPENGL: Add support for RGB555 output format. 2011-02-25 03:35:55 +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
Johannes Schickel 020a413247 OPENGL: Set _gameTexture to 0 after deleting it.
This fixes a segfault when trying to use the OpenGL backend with 16bpp games,
however this does not make Last Express nor Loom PC-Engine Japanese work for
me. They now fail with a "Pixel format not supported" error.
2011-02-24 18:36:57 +01:00
Johannes Schickel d81bb9794f OPENGL: Prefer single operation texture updates.
When doing glTexSubImage2D we do not need to assure that the source data has
the same width as the texture when we want to update the data, we just need
to assure that the width * Bpp cound matches the pitch.
2011-02-24 17:10:49 +01:00
Johannes Schickel f5e10f33f5 OPENGL: Properly setup pixel data alignment.
If we do not do this, we might end up with a default alignment of 4, which will
fail (as in the graphics will be messed up) in case the screen resolution is
not divisible by 4.

Thanks to digitall for noticing this problem and finding out about
GL_UNPACK_ALIGNMENT.
2011-02-24 05:11:00 +01:00
Johannes Schickel e04d983f68 SDL: Use the SDL_Surface's pitch in copyRectToScreen.
This fixes messed up graphics, when SDL decides to add padding bytes to the
lines of an SDL_Surface. Formerly the code always calculated the pitch via
w*bpp, which of course does not work in all cases.
2011-02-24 04:24:58 +01:00
Johannes Schickel 7f139f8dcf SDL: Output a warning in case the focus rect does not fit inside the screen.
Sadly it seems the engines do not care whether their focus rect really fits
inside the game screen. To ease finding such instances (which might cause odd
clipping by the backend) I added a warning for them.
2011-02-24 01:19:10 +01:00
Johannes Schickel 87f260a66c SDL: Add config file variable to enable the focus rect debug code.
The variable is named "use_sdl_debug_focusrect" for now. The debug code is
still only enabled, when a ScummVM debug version is built though.
2011-02-24 01:15:27 +01:00
Johannes Schickel 466030443a SDL: Add a debug focus rect implementation.
This implementation currently draws a rect frame around the focus rect area.
2011-02-24 01:11:16 +01:00
Johannes Schickel e2aafb603e SDL: Move focus rectangle dummy implementations to .cpp file. 2011-02-24 00:09:25 +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
Johannes Schickel 32d0e4c15f OPENGLSDL: Avoid warping in warpMouse when the logical coordinates did not change.
This fixes a slight move of the mouse cursor when the hardware mouse position
is at a subpixel from the logical coordinates.
2011-02-19 20:46:47 +01:00
Johannes Schickel 9954eb5a99 OPENGL: Get rid of adjustMouseEvent.
Rather than that I introduced a function which converts hardware screen
coordinates to overlay / game screen coordinates.

The logic which converts mouse movement events with hardware screen
coordinates to overlay / game screen coordinates is now inside notifyEvent.

This is still broken design, since one should not abuse an observer for that.
2011-02-19 20:46:47 +01:00
Johannes Schickel 3aba54b8b0 OPENGL: Fix documentation of OpenGLGraphicsManager::MousePos. 2011-02-19 20:46:47 +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