Commit Graph
4365 Commits
Author SHA1 Message Date
Johannes Schickel 919e577ba6 SDL: Fix invalid memory access in getSystemLanguage.
A call to setlocale can invalidate the string a previous setlocale call
returned. Instead of saving a pointer we copy the returned string now. This,
for example, fixes invalid memory access on my system.

See de8da01b0e for the commit introducing the
invalid memory access.
2013-11-03 18:47:03 +01:00
D G Turner de8da01b0e SDL: Remove side effect of setlocale() call to get Language.
This is to fix bug #3615148 -  "ALL: sscanf("%f"), atof() etc. not
portable due to Locale"

The side effect of setlocale("") is to change the active locale
from the default of "C" to the detected system locale, but this
changes the behaviour of sscanf() and several other functions
in a system dependent and non-portable way. This has caused
bugs in the ZVISION engine when running Zork Nemesis.

The solution is to restore the default "C" locale after the call
to get the language.

Thanks to criezy for working out this fix.
2013-11-03 17:10:18 +00:00
Johannes Schickel ea6d38d5f3 SDL: Make activateManager/deactivateManager SdlGraphicsManager specific.
We can do this now that we can use virtual inheritance and dynamic_cast
because we enabled RTTI.
2013-10-24 00:06:32 +02:00
Johannes Schickel 092d36f392 SDL: Reduce code duplication a bit.
Now instead of initializing this in OSystem_SDL::initSDL (and in subclasses
overwriting this) we simply initialize it in OSystem_SDL::init.
2013-10-23 22:59:13 +02:00
Johannes Schickel c323dedf3c SDL: Fix default graphics mode for switchable case.
The former code (incorrectly) assumed that the getDefaultGraphicsMode returns
the index in the table returned by getSupportedGraphicsModes. Now the correct
ID is searched and then used.
2013-10-23 22:59:09 +02:00
Johannes Schickel d34c9d5bcb SDL: Do not require a static graphics mode list in OpenGL and SurfaceSDL. 2013-10-23 22:59:06 +02:00
Johannes Schickel a9cb67df08 SDL: Only allow switching of SurfaceSDL <-> OpenGL when no custom manager is used. 2013-10-23 22:59:02 +02:00
Johannes Schickel 38543f772c SDL: Make setupGraphicsModes non-virtual.
The logic of switching the managers is pretty much fixed at the same level
and cannot be easily overwritten.
2013-10-23 22:58:57 +02:00
Johannes Schickel 17cb26b93c SDL: Simplify initial graphics manager selection for OpenGL. 2013-10-23 22:58:53 +02:00
Johannes Schickel 4080a7a3f6 SDL: Get rid of _glModesCount. 2013-10-23 22:58:50 +02:00
Johannes Schickel c5e2b5158c SDL: Get rid of loop in OSystem_SDL::setGraphicsMode. 2013-10-23 22:58:46 +02:00
Johannes Schickel e91300f70c SDL: Clean up graphics mode handling for OpenGL backend.
Instead of custom memory management Common::Array is used now.
2013-10-23 22:58:42 +02:00
Johannes Schickel 1a56b521b5 SDL: Always initialize video subsystem in initSDL. 2013-10-23 22:58:38 +02:00
Johannes Schickel 6e46e9dfaf SDL: Clean up graphics manager switching slighty.
Sadly this also requires us to extend GraphicsManager for this SDL specific
feature. However, since that's only used in the SDL backend and Tizen it
should be fine for now...
2013-10-23 22:58:34 +02:00
Johannes Schickel f20471d962 Merge pull request #408 from lordhoto/opengl-replacement
OpenGL revamp
2013-10-20 06:20:46 -07:00
Johannes Schickel 37f7123552 TIZEN: Add some further OpenGL related changes by Chris. 2013-10-19 22:18:22 +02:00
Johannes Schickel 20e4a7f0ce TIZEN: Adapt to new OpenGL code.
Thanks to Chris Warren-Smith for testing this a bit.
2013-10-19 22:17:42 +02:00
Johannes Schickel 5ce830b976 SDL: Add a OpenGL SDL backend and hook it into the SDL backend.
The hooking code is nearly exactly the old hooking code. Only the OpenGL SDL
creation has been adapted since it uses a different constructor now.
2013-10-19 22:14:24 +02:00
Pawel Kolodziejski 790db038c0 ALL: sync with scummvm 2013-10-13 11:30:34 +02:00
D G Turner 51cb755726 ANDROID: Really fix compilation.
The vanilla android toolchain even is unhappy when unknown folders are
present in the resources directory, so have moved the ouya specific
resources out to another directory.
2013-10-09 23:26:58 +01:00
D G Turner 2648062dcf ANDROID: Fix compilation.
The aapt throws an "invalid resource directory name" if the
resource directory name is not known to the tools. Unfortunately,
"values-television" is an OUYA specific addition and thus breaks
with the standard vanilla Android toolchain.
2013-10-09 06:53:53 +01:00
David Turner d4d90b3f07 Merge pull request #372 from zeldin/ouya
Basic OUYA support
2013-10-08 18:26:49 -07:00
Johannes Schickel 8a6e57cba1 BACKENDS: Remove OpenGL and OpenGL SDL backend.
This breaks our Tizen port.
2013-10-05 00:20:02 +02:00
Torbjörn Andersson a8ff238e7a TIZEN: Silence cppcheck warning in scanStringUntil()
This is consistent with scanString(), and I have verified that the
included test cases still work.
2013-08-23 22:37:50 +02:00
Marcus Comstedt 7a1ffe8c59 ANDROID: Add some margins when screen is a TV 2013-08-18 15:21:18 +02:00
Chris Warren-Smith 1f4feaffb0 TIZEN: updates for tizen 2.2 SDK 2013-08-17 08:52:14 +10:00
Johannes Schickel 7c58e9a6d5 DC: Use const version of ConfigManager::getGameDomains.
This should fix compilation for the DC port.
2013-08-13 00:26:58 +02:00
Marcus Comstedt bb39cbcba4 ANDROID: Enter main menu on middle mouse press 2013-08-08 15:16:06 +02:00
Marcus Comstedt a50ede203b ANDROID: Add support for joystick motion 2013-08-08 14:53:36 +02:00
Marcus Comstedt 1b69f8aede ANDROID: Add gamepad button support 2013-08-08 14:08:30 +02:00
Johannes Schickel 952a119ae1 IPHONE: Fix accidental double free.
This was a copy&paste error. I also adapted the comment to be more clear.
2013-08-07 21:41:24 +02:00
Marcus Comstedt 9a888ed1c8 ANDROID: Add OUYA icon and intent 2013-08-07 17:19:24 +02:00
Johannes Schickel c28f3baa77 N64: Do not access Surface::pixels anymore. 2013-08-06 03:51:12 +02:00
Johannes Schickel 30d2eb7a97 DC: Do not access Surface::pixels directly. 2013-08-06 03:51:12 +02:00
Johannes Schickel d9b90d67d3 ANDROID: Do not access Surface::pixels directly. 2013-08-06 03:51:12 +02:00
Johannes Schickel 9179f0b78f PSP: Do not access Surface::pixels directly. 2013-08-06 03:51:11 +02:00
Johannes Schickel 09f7e4d5d4 IPHONE: Do not access Surface::pixels directly. 2013-08-06 03:51:11 +02:00
Johannes Schickel 6d86a66493 NDS: Do not access Surface::pixels directly. 2013-08-06 03:51:11 +02:00
Johannes Schickel 6639958d7a PS2: Do not access Surface::pixels directly. 2013-08-06 03:30:38 +02:00
Johannes Schickel 0f050fe797 WII: Do not access Surface::pixels directly. 2013-08-06 03:29:16 +02:00
Johannes Schickel 7670680aa8 IPHONE: Take advantage of Surface::getPixels. 2013-08-03 04:02:53 +02:00
Eugene Sandulenko 2c812ade01 Merge pull request #353 from clone2727/eventrec_timer_fix
ALL: Don't use EventRecorder at all when not compiled in
2013-07-18 08:15:28 -07:00
Sven Hesse 989ea7cb56 JANITORIAL: Remove trailing whitespace 2013-07-14 19:01:47 +02:00
Pawel Kolodziejski 068ff94d20 ALL: synced with ScummVM 2013-07-07 15:29:33 +02:00
Matthew Hoops 4a7e4e5b22 ALL: Don't use EventRecorder at all when not compiled in 2013-07-06 23:54:45 -04:00
Johannes Schickel be61cb669a Merge pull request #350 from chrisws/tizen_port_1_6_0a
TIZEN: bada port updated to tizen

Conflicts:
	backends/platform/tizen/system.cpp
2013-07-04 23:33:02 +02:00
Eugene Sandulenko 49210a803a Merge pull request #331 from sev-/gsoc2012-eventsrecorder
GSoC2012: Event Recorder (reworked)
2013-07-04 04:58:54 -07:00
Johannes Schickel 93fc260885 SDL: Fix compilation by moving getMixerManager out of USE_OPENGL guard. 2013-07-04 14:47:25 +03:00
Johannes Schickel 86c656a75b SDL: Fix compilation on Solaris 10.
This replaces a dummy FILE definition before including the SDL headers with
simply using the toolchain's definition on Solaris. This is pretty harmless
because we only allow FILE to be used in the SDL headers by this.

Fixes bug #3614514 "#define FILE FAKE_FILE doesn't work on Solaris (w/ patch)".

Thanks to lblume for his patch!
2013-07-04 01:25:46 +02:00
Chris Warren-Smith be399188c4 TIZEN: bada port updated to tizen 2013-07-03 07:04:11 +10:00