aboutsummaryrefslogtreecommitdiff
path: root/backends/platform/sdl/sdl.cpp
AgeCommit message (Collapse)Author
2018-04-29SDL: Handle encoding conversion for clipboard textThierry Crozat
2018-04-29OSYSTEM: Add API to copy text to clipboardThierry Crozat
This has also been implemented for the SDL2 and macOS backends.
2017-12-26SDL: Only enable joystick related features when joysticks are enabledBastien Bouclet
Fixes #9714.
2017-12-26SDL: Cleanup joystick deadzone handlingBastien Bouclet
2017-12-26SDL: Move the non analog joystick code to the Symbian portBastien Bouclet
Symbian was the only user of that code.
2017-11-26Revert "SDL: Use RLE acceleration for SDL2 transparent surfaces"Thierry Crozat
This reverts commit 6b4195a542083c97f696c843b9823d578b018996. There seemed to be no clear benefit in using RLE for transparent surfaces, and there were a few reports that it might cause crashes on Windows. So to be on the safe side I prefer to revert this commit.
2017-11-19SDL: Improve handling of SDL2 keyboard repeat eventsBastien Bouclet
- Flag them as repeat events - Disable ScummVM's own repeat event generation This fixes keyboard repeat events not being flagged as such with SDL2, and complies with the user's operating system preferences regarding key repeat timings.
2017-11-11SDL: Use RLE acceleration for SDL2 transparent surfacesThierry Crozat
We were already doing it for SDL1.2, but with SDL2 the SDL_RLEACCEL is not passed to SDL and instead we need to call SDL_SetSurfaceRLE.
2017-10-07SDL: Do not reset window size when engines update rendering surfaceColin Snover
This change allows: * Engines to update their target rendering surface/size and pixel format with the backend multiple times during gameplay; * Users to resize the ScummVM window without having it reset size/position every time an engine updates its target surface format; * Conversions/scaling to continue to run efficiently in hardware, instead of requiring engines to pick their maximum possible output format once and upscale inefficiently in software; * The window to reset size once when an engine calls to set its initial output size, and to reset again once ScummVM returns to the launcher. This is relevant for at least SCI32 and DreamWeb engines, which perform graphics mode switches during games.
2017-08-01Windows: Use GetUserDefaultUILanguage() instead of GetThreadLocale().Frank Richter
The thread locale concerns display options (e.g. date formatting) not the display language. There are typically, but not necessarily the same, as Windows allows them to be configured separately.
2017-04-24SDL: Allow specifying the screenshot directory in the config fileThierry Crozat
There is no GUI option to set the screenshot directory, but this allows power users to set it if they don't want to use the default.
2017-04-24WINDOWS: Change location where screenshot are savedPala
This fixes bug #9701: WINDOWS: Flow of taking screenshots on Windows is broken
2017-02-22SDL: Fix erratic analog pointer + control optionsrsn8887
Fixes erratic speeds in analog pointer motion Implemented option to set analog/keyboard pointer speed and control the analog joystick deadzone. The deadzone option appears only if the build supports analog joystick (via JOY_ANALOG define)
2016-09-13SDL: Add a fixme regarding the encoding of the string returned by ↵Bastien Bouclet
getTextFromClipboard
2016-09-13SDL: Plug a memory leak in OSystem_SDL::getTextFromClipboardBastien Bouclet
2016-09-03BUILD: Tie the SDL_net version to the SDL versionThierry Crozat
This means that when using SDL 1.2 we use SDL_net 1.2, but when using SDL 2 we now use SLD_net 2 as well. Both versions work properly and there is not code change needed in ScummVM. This change is because SDL_net depends on SDL, and using SDL_net 1.2 with SDL 2 means we can end up needing to link with both the SDL and SDL2 libraries.
2016-08-24ALL: Move Clipboard support to OSystemAlexander Tkachev
Commit adds kFeatureClipboardSupport. hasTextInClipboard() and getTextFromClipboard(). OSystem_SDL has this feature if SDL2 is used. EditableWidget and StorageWizardDialog use g_system to access clipboard now.
2016-08-24CLOUD: Init SDL_NetAlexander Tkachev
2016-08-24CLOUD: Make CloudManager singletonAlexander Tkachev
It's needed to ::destroy() it in main().
2016-08-24CLOUD: Add CurlJsonRequestAlexander Tkachev
Now we can do REST API request by creating CurlJsonRequest and waiting for it to call our callback. Passed pointer is Common::JSONValue. This commit also does some minor variable renaming fixes.
2016-08-24CLOUD: Add USE_CLOUD featureAlexander Tkachev
Adds USE_CLOUD in both configure and create_project.
2016-08-24CLOUD: Add Cloud::Manager and Cloud::StorageAlexander Tkachev
This commit introduces Common::CloudManager, which can be accessed from OSystem. The backend for this manager is Cloud::Manager (defined in backends/cloud/manager.h). It should load all users storages from configs and provide access to current Storage instance. For now it just creates a new one. Cloud::Storage (backends/cloud/storage.h) provides an API to interact with cloud storage, for example, create new directory or sync files. Right now it's not ready and has only two dummy methods: listDirectory() and syncSaves(). There is Cloud::Dropbox::DropboxStorage backend (backends/cloud/dropbox/dropboxstorage.h) for Cloud::Storage. Right now it implements both listDirectory() and syncSaves() with starting timer task and handling it by printing out some JSON examples.
2016-08-24CLOUD: Integrate CloudThread into OSystemAlexander Tkachev
Would be changed soon.
2016-07-28COMMON: Remove the EventRecorder dependency from OSystemBastien Bouclet
EventRecorder is in the gui lib which is not linked in the cxxtest suite.
2016-03-13SDL: Get rid of reference to SDL 1.3.Johannes Schickel
We only support SDL 1.2 and SDL 2.
2016-03-13BACKENDS: Use a virtual function for creating the SDL audio CD managerMatthew Hoops
2015-12-15PS3: Make use of an updated SDL2 versionBastien Bouclet
This version, available at https://bitbucket.org/bgK/sdl_psl1ght, is based on SDL 2.0.3.
2015-02-16SDL: Handle icon setup in SdlWindow.Johannes Schickel
2015-02-16SDL: Add basic abstraction class for the SDL window.Johannes Schickel
2015-01-25SDL: Add experimental support for SDL2.Johannes Schickel
This is based upon skristiansson's change set to make ScummVM work with SDL2.
2015-01-25SDL: Cleanup graphics manager switching a bit.Johannes Schickel
2015-01-25SDL: Refactor WM specific functionality into SdlGraphicsManager.Johannes Schickel
2014-10-28BACKENDS: Remove trailing whitespaceFilippos Karapetis
2014-02-18SDL: Make GPL headers consistent in themselves.Johannes Schickel
2014-02-16SDL: Move debugging code to output SDL video driver name to initBackend.D G Turner
The initBackend() function is called later after the command line is parsed and thus debug() prints can be used, which are much less noisy.
2014-02-12SDL: Add debugging code to output SDL video driver name being used.D G Turner
2014-01-23Merge pull request #409 from lordhoto/rttiJohannes Schickel
Enable RTTI and clean up the code by exploiting the availability of dynamic_cast.
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: 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