Commit Graph
6575 Commits
Author SHA1 Message Date
Colin Snover 56810b5598 MACOS: Fix deprecation warnings in macOS 10.12 2017-09-10 22:17:16 -05:00
Colin Snover d2b4e16ab2 SDL: Fix unsafe sprintf usage
Translation strings come from external data sources and can cause
a stack buffer overflow here just by accidentally (or maliciously)
being too long.
2017-09-03 20:00:23 -05:00
Cameron Cawley aba431ca9b RISCOS: Use double quotes in sed command 2017-09-03 10:40:07 +02:00
Cameron Cawley 0d1df59be1 RISCOS: Automatically calculate the correct WimpSlot size 2017-09-03 10:40:07 +02:00
Cameron Cawley b9694a01db RISCOS: Use shorter filenames for config and log files 2017-09-03 10:40:07 +02:00
Cameron Cawley 0e7d9414a6 RISCOS: Correctly set executable extension 2017-09-03 10:40:07 +02:00
Cameron Cawley 7a00045df0 RISCOS: Add networking files to application 2017-09-03 10:40:07 +02:00
cameron a11985c46d RISCOS: Add RISC OS support 2017-09-03 10:40:07 +02:00
Eugene Sandulenko bb58647588 NETWORKING: Fix warning 2017-08-11 22:05:35 +02:00
Eugene Sandulenko addcdd5ae8 NETWORKING: Fix data type cast in comparison. char is usually signed 2017-08-11 22:00:15 +02:00
Eugene Sandulenko 1d086b9f20 BACKENDS: SURFACESDL: Add missing break statement 2017-08-11 21:59:59 +02:00
Torbjörn Andersson 665f5c99b2 JANITORIAL: Silence some more GCC 7 fall through warnings
I think these are the last one that were already flagged as being
deliberate.
2017-08-06 16:54:38 +02:00
Bastien Bouclet 8e4697946e OPENGL: Always clear the whole backbuffer
Previously we were clearing the whole backbuffer for 3 frames after a
window size change, and then only clearing the game area. This assumes
the OpenGL driver uses at most 3 render buffer and uses them in
sequential order. This does not seem to be the case on Linux when using
an Intel integrated GPU.
Instead we now clear the whole backbuffer on each frame to make sure
there are no leftovers remaining on the screen. All semi-recent GPUs
should have hardware clear anyway so this should not impact negatively
performance.

Possibly fixes #10025.
2017-08-05 08:36:32 +02:00
Frank Richter 0f93962ef4 Windows: Use GetUserDefaultUILanguage() instead of GetThreadLocale().
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-08-01 08:55:48 +02:00
Bastien Bouclet 8c587b54ab SDL: Make the window size when exiting fullscreen workaround macOS specific
The call to SDL_SetWindowSize works around a macOS specific SDL2 bug.
Fixes the window not restoring to its previous position when exiting
fullscreen on Linux/X11.
2017-07-29 17:25:37 +02:00
Thierry Crozat 00bbb73ce5 SDL: Make sure we get the correct window size with SDL2
When updating or recreating the window, if we changed the window
size at the same time we also toggle between OpenGL and non
OpenGL mode, or toggle fullscreen mode, we may have a pending
SDL resize event with the wrong size. So we need to make sure to
append another one with the correct size to end up with the correct
size. This fixes bug #9971.
2017-07-27 21:05:44 +01:00
Schrijvers Luc a2792531f6 NETWORKING: fix missing SIOCGIFCONF for Haiku (#973) 2017-07-17 21:35:23 +02:00
Eugene Sandulenko 940b2a20f1 Revert "COMMON: Change way the Singleton instances are instantiated"
This reverts commit eefa72afa1.

With this patch ConfigManager is broken.
2017-07-10 21:17:41 +02:00
Thierry Crozat eefa72afa1 COMMON: Change way the Singleton instances are instantiated
This fixes tons of warnings with clang from a recent xcode version on
macOS (and possibly other systems) complaining that an instantiation
of _singleton is required but no definition is available.
2017-07-10 21:11:20 +02:00
Colin Snover 065dd9671e SDL: Fix compilation with SDL1.2 2017-07-06 19:27:52 -05:00
Colin SnoverandBastien Bouclet 332fabcb8a SDL: Only recreate SDL2 window when necessary
Destroying and recreating the SDL window whenever the video mode
changes in SDL2 is not necessary and causes several problems:

1. In windowed mode, the game window shifts position;
2. In fullscreen mode in macOS, every time the window is
   recreated, it causes the OS to play its switch-to-fullscreen
   animation again and emit system alert noises;
3. The window content flickers; and
4. The engine loses events from the old destroyed window.

This patch changes the SDL backend code to avoid destroying and
recreating the SDL window when using SDL2, except when switching
OpenGL modes, since there is no way to change the OpenGL feature
of a window.

There are still some outstanding issues with OpenGL where window
size ends up getting reset even though the user has resized it;
this will probably need to be addressed at some point in another
patch.

Thanks to @bgK and @criezy for their feedback which made this
patch much better.

Co-Authored-By: Bastien Bouclet <bastien.bouclet@gmail.com>
2017-07-06 19:11:54 -05:00
lubomyr 4d53bdc7fe ANDROIDSDL: implemented checking and fixing sdcard path 2017-06-25 10:50:36 +02:00
Colin Snover 2d3c86187f MACOSX: Fix flipped return value of openUrl 2017-05-21 19:37:14 -05:00
Colin Snover fa0bb7dd5a BACKENDS: Compress screenshots using PNG if available
Closes gh-948.
2017-05-21 15:55:39 -05:00
Bastien Bouclet 23abcffbc5 OPENGL: Don't update the cursor's texture when the cursor is invisible
Updating the cursor's texture is not necessary if it is not going to be drawn.

Fixes glDrawArrays sometimes failing due to using a framebuffer with an
incomplete color attachment. In SCI32 games, the framebuffer is incomplete
because the engine does not define pixel data for the cursor.
2017-05-08 06:50:30 +02:00
Thierry Crozat 9a8aea0585 CLOUD: Fix compilation with old curl vesions 2017-04-29 22:10:16 +01:00
Thierry Crozat 442edb6ccc MACOSX: Expand ~ in default screenshot path
When using SDL to save the screenshot, using a told results in
an error.
2017-04-26 08:39:06 +01:00
Kirben ec0b1dec9d WINDOWS: Fix warning under mingw-w64. 2017-04-24 11:22:44 +10:00
Kirben b46a1b688d WINDOWS: Hopefully fix mingw compilation. 2017-04-24 10:57:02 +10:00
Thierry Crozat a1dab31c08 WIN32: Fix compilation of getScreenshotPath (missing parenthesis) 2017-04-24 01:28:50 +01:00
Thierry Crozat 23987cc724 WIN32: Comment out code that gets the user My Pictures directory
This broke compilation on buildbot as ShlObj.h cannot be found.
A developer that has access to Windows should take a look to
properly fix this.
2017-04-24 01:21:36 +01:00
Thierry Crozat a9ae691513 SDL: Improve debug and warning messages when saving screenshots
In particular this adds a warning when failing to save a screenshot
in OpenGL mode (there was already one in SurfaceSDL mode).
2017-04-24 01:07:16 +01:00
Thierry Crozat e96c057c3d SDL: Allow specifying the screenshot directory in the config file
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-24 01:07:05 +01:00
Thierry Crozat 11dd33bb73 MACOSX: Create screenshot on Desktop
This is consistent with the OS shortcut (Crtl+Shift+3) to take a
screenshot.
2017-04-24 01:06:50 +01:00
Thierry Crozat 438f23f272 SDL: Use dynamic cast instead of C cast to get screenshot path 2017-04-24 01:06:40 +01:00
Pala 3849a3e90e WINDOWS: Change location where screenshot are saved
This fixes bug #9701: WINDOWS: Flow of taking screenshots
on Windows is broken
2017-04-24 01:06:29 +01:00
Torbjörn Andersson 6cda47ca3d JANITORIAL: Remove superfluous semicolons 2017-04-18 06:49:14 +02:00
Thierry Crozat a20d2172fa SDL: Respect OS setting for wheel scroll direction on SDL 2.0.4+
The setting was already respected on SDL < 2.0.4 (such as SDL1).
If the OS inverts the scrolling direction, this is reflected on the sign
of the y value of the SDL event. Since version 2.0.4 the SDL event
also had a flag to indicate if the direction is flipped and we were
using it to change back the y sign. That means the OS scrolling
direction setting was not respected. With this commit we now have
a consistent behaviour with all SDL versions (the OS scroll direction
setting is respected).

If our wheel events are used for something other than scrolling
however, we might want to get the actually wheel move direction
(i.e. use a Common::EVENT_WHEELDOWN when moving the wheel
down even if the OS scroll setting is to flip it). In such a case we
might want to revert this change and instead add an additional flag
to the event so that we know the scroll direction should be flipped
and use it in places where the event is used for scrolling.
2017-03-21 21:06:35 +00:00
rsn8887 96f720d93d PSP2: remove date from executable name 2017-03-06 17:10:10 -06:00
rsn8887 44de995bb6 SDL: Fix trying to init non-supported shaders (#917) 2017-03-06 08:57:21 -06:00
Eugene Sandulenko 8b8fd13d56 BACKENDS: Fix const'ness which led to warnings 2017-03-05 00:56:27 +01:00
Eugene Sandulenko 9cf5ebecdf BACKENDS: Fix crash on startup 2017-03-05 00:43:49 +01:00
Eugene Sandulenko 547e5846a1 Merge pull request #915 from rsn8887/vita
PSP2: Add Playstation Vita support
2017-03-04 22:45:01 +01:00
cpasjuste 70988527c6 PSP2: Add Playstation Vita (PSP2) support 2017-03-04 15:42:19 -06:00
Willem Jan Palenstijn 72962ae0f6 CLOUD: Fix whitespace 2017-03-04 15:09:08 +01:00
Eugene Sandulenko cfc83b4a0a BACKENDS: NETWORKING: Fix warning 2017-03-04 14:52:51 +01:00
Alexander 302f6e6bcc CLOUD: Fix LocalWebserver::resolveAddress() on Android
No <ifaddrs.h> available on Android, thus fixed similarly to https://github.com/zlargon/lssdp/commit/9b4568
2017-03-04 19:49:28 +06:00
rsn8887 12e226922d SDL: Always use sub-pixel joystick pointer resolution 2017-03-01 09:55:20 -06:00
D G Turner b779f20502 CLOUD: Fix GCC Unused Variable Warning.
This variable is not used as the constructors for the storage type
classes store the resulting objects into the Cloud Manager using
replaceStorage(this) instead.
2017-02-28 20:42:17 +00:00
rsn8887 58bbc0e887 SDL: fix pointer speed setting 8 (was too slow) 2017-02-27 19:59:18 -06:00