aboutsummaryrefslogtreecommitdiff
path: root/backends/platform/sdl
AgeCommit message (Collapse)Author
2013-11-14SDL: Fix bug where config file path could exceed maximum path length.D G Turner
The fix is the change in the MAXPATHLEN check, but have also migrated this to Common::String to make the fix easier. Thanks to klusark for pointing out this problem.
2013-11-11SDL: Remove misleading comments, based on incomplete information at MSDN. ↵Kirben
GetLocalInfo is supported on Windows 95 onwards, but MSDN fails to mention older Windows versions.
2013-11-03SDL: Fix invalid memory access in getSystemLanguage.Johannes Schickel
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 de8da01b0e8a309b9ed3f5b0f152ebbcf8f4af37 for the commit introducing the invalid memory access.
2013-11-03SDL: Remove side effect of setlocale() call to get Language.D G Turner
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-10-24SDL: Make activateManager/deactivateManager SdlGraphicsManager specific.Johannes Schickel
We can do this now that we can use virtual inheritance and dynamic_cast because we enabled RTTI.
2013-10-23SDL: Reduce code duplication a bit.Johannes Schickel
Now instead of initializing this in OSystem_SDL::initSDL (and in subclasses overwriting this) we simply initialize it in OSystem_SDL::init.
2013-10-23SDL: Fix default graphics mode for switchable case.Johannes Schickel
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-23SDL: Do not require a static graphics mode list in OpenGL and SurfaceSDL.Johannes Schickel
2013-10-23SDL: Only allow switching of SurfaceSDL <-> OpenGL when no custom manager is ↵Johannes Schickel
used.
2013-10-23SDL: Make setupGraphicsModes non-virtual.Johannes Schickel
The logic of switching the managers is pretty much fixed at the same level and cannot be easily overwritten.
2013-10-23SDL: Simplify initial graphics manager selection for OpenGL.Johannes Schickel
2013-10-23SDL: Get rid of _glModesCount.Johannes Schickel
2013-10-23SDL: Get rid of loop in OSystem_SDL::setGraphicsMode.Johannes Schickel
2013-10-23SDL: Clean up graphics mode handling for OpenGL backend.Johannes Schickel
Instead of custom memory management Common::Array is used now.
2013-10-23SDL: Always initialize video subsystem in initSDL.Johannes Schickel
2013-10-23SDL: Clean up graphics manager switching slighty.Johannes Schickel
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-19SDL: Add a OpenGL SDL backend and hook it into the SDL backend.Johannes Schickel
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-05BACKENDS: Remove OpenGL and OpenGL SDL backend.Johannes Schickel
This breaks our Tizen port.
2013-07-06ALL: Don't use EventRecorder at all when not compiled inMatthew Hoops
2013-07-04Merge pull request #331 from sev-/gsoc2012-eventsrecorderEugene Sandulenko
GSoC2012: Event Recorder (reworked)
2013-07-04SDL: Fix compilation by moving getMixerManager out of USE_OPENGL guard.Johannes Schickel
2013-07-04SDL: Fix compilation on Solaris 10.Johannes Schickel
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-05-17RECORDER: Implement Events RecorderEugene Sandulenko
2012-11-18OSX: Remove use of deprecated methodsThierry Crozat
FSRef and FSPathMakeRef have been deprecated in OS X 10.8. So we use CFURLRef instead.
2012-11-18OSX: Improve native OS X browser dialogMax Horn
Signed-off-by: Thierry Crozat <criezy@scummvm.org>
2012-09-26JANITORIAL: Remove trailing whitespaces.Johannes Schickel
Powered by: git ls-files "*.cpp" "*.h" "*.m" "*.mm" | xargs sed -i -e 's/[ \t]*$//'
2012-09-24SDL: Remove main.cpp.Alyssa Milburn
Backends have to provide their own main, instantiating OSystem_SDL directly is unsupported.
2012-06-09COMMON: Add tm_wday to our TimeDate structMatthew Hoops
Did not adapt bada or ps2 backends as I'm not sure how they should be handled
2012-03-17JANITORIAL: Remove +x from files, which should not be executable.Christoph Mallon
2012-02-28KEYMAPPER: HardwareInputSet now has defaultsTarek Soliman
Ports can add additional special keys. SDL no longer carries the static tables. Default behavior unchanged: HardwareInputSet() still gives an empty one.
2012-02-27KEYMAPPER: Rename HardwareKey to HardwareInputTarek Soliman
2012-02-21KEYMAPPER: Remove automapping dead codeTarek Soliman
2012-02-15JANITORIAL: Fix missing whitespace in pointer castTarek Soliman
find -name '*.h' -or -name '*.cpp' | xargs sed -r -i 's@\(([A-Za-z0-9]+)\*\)@(\1 *)@g' This seems to have caught some params as well which is not undesirable IMO. It also caught some strings containing this which is undesirable so I excluded them manually. (engines/sci/engine/kernel_tables.h)
2012-02-13SDL: Get rid of unneeded forwards.Johannes Schickel
2012-02-13ALL: Enable Keymapper specific OSystem API only when the Keymapper is enabled.Johannes Schickel
2012-02-12KEYMAPPER: Refactor HardwareKeySet generationTarek Soliman
2012-01-23WINDOWS: Add default save paths for Windows NT4 onwardsTravis Howell
2012-01-14OSX: Avoid use of NSString:stringWithCString, for OS X 10.2 and 10.3 ↵Oystein Eftevaag
compatibility
2011-12-13WIN32: Fix build by adapting to the latest Archive changesFilippos Karapetis
2011-12-13WIN32: (Hopefully) fix compilation by adapting to latest Archive changes.Johannes Schickel
2011-10-03MACOSX: Detect system preferred language when starting bundleThierry Crozat
This reimplement getSystemLanguage() for MacOS X because setlocale() only works if the application is started from the terminal. Instead we use CFBundleCopyPreferredLocalizationsFromArray() which requires the translations to be listed in the bundle plist file (this had already been committed). This fixes bug #3394080.
2011-09-22MAEMO: Add basic platform backend with stubbed keymapperTarek Soliman
2011-08-11SDL: Previous commit broke compilation on MSVCPaul Gilbert
Including cursorman.cpp rather than cursorman.h resulted in the CursorManager class being present in multiple .obj files, resulting in linking errors.
2011-08-11SDL: Implement a hellish workaround to fix bug #3368143.Johannes Schickel
The bug in question is "SDL/OpenGL: Crash when switching renderer backend". To fix it I added a stupid graphics state copying to the SDL backend, in case the graphics manager is switched. The implementation of this is considered a pure workaround, no one should ever do it like this in reality... I just want to die when looking at this... Not sure why I actually committed it. Anyway it at least makes the OpenGL backend testable for those who do not want to fiddle with the config file directly.
2011-08-09SDL: Take advantage of SdlGraphicsManager.Johannes Schickel
This gets rid of the hacks, where SdlEventSource added events with custom type numbers to pass SDL_VIDEOEXPOSE and SDL_VIDEORESIZE to the graphics manager. Furthermore it get rids of the uninituitive and hard to trace way of assigning the proper mouse coordinates to mouse related events. Formerly it passed the real screen coordinates through the even dispatching api to the graphics manager (at least hopefully ;-) and let that handle creating a new event with the proper coordinates. Now instead SdlEventSource handles the proper coordinate setup itself. Since this is a behavior change and I can not test all the SDL based small devices ports this commit might break compilation for them and more serve it might also break mouse position behavior. If any of that occurs I am sorry about it.
2011-08-09SDL: Let SDL based graphics managers inherit from SdlGraphicsManager.Johannes Schickel
This also adapts port I can not test (not even the compilation). So if this breaks anything I am sorry about it.
2011-08-06RECORDER: Added stub for delayMillis() processingEugene Sandulenko
2011-08-02MACOSX: Turned update support off by default, simplified and cleaned the ↵Oystein Eftevaag
pull request
2011-07-19MACOSX: Add Sparkle supportCeRiAl
2011-07-19JANITORIAL: Fix MSVC warningsLittleboy
- Conversion from double to float - Unary minus operator applied to unsigned type - ARRAYSIZE redefinition