Commit Graph

598 Commits

Author SHA1 Message Date
Jaromir Wysoglad
bbbb608c52 TTS: Implement OSD message reading 2019-09-01 22:47:55 +03:00
Cameron Cawley
ea9e33bd10 GUI: Check if fullscreen is available at runtime 2019-08-18 06:21:28 +03:00
D G Turner
54c465ef17 BACKENDS: Fix GCC Warnings in Surface SDL Graphics
This removes the usage of memset to clear complex structures and replaces
them with constructor methods for the structures which will be executed
when these are instantiated.
2019-08-15 16:26:53 +01:00
Cameron Cawley
1feb86ee97 BACKENDS: Handle screen shaking in WindowedGraphicsManager 2019-08-15 02:01:21 +03:00
rsn8887
afd360703e VITA: Use activeArea rectangle also on Vita 2019-08-13 20:54:59 -05:00
rsn8887
5b32f377a9 BACKENDS: add Fit to window (4:3) stretch mode to SDL2 backend 2019-08-13 20:42:56 -05:00
Cameron Cawley
30234728d6
SDL: Removed invalid override from getGraphicsScalerProc() 2019-08-11 12:42:56 +01:00
Cameron Cawley
9b6461122e SDL: Move selecting the required ScalerProc into a separate function 2019-08-11 14:27:52 +03:00
Cameron Cawley
d765440c1a OPENGL: Support RGBA8888 swapped textures when using OpenGL ES 2019-08-04 18:46:30 +01:00
Cameron Cawley
a2dcd6c4ff
SYMBIAN: Remove unused class declarations 2019-07-27 12:37:39 +01:00
Cameron Cawley
8e8594aa0e SYMBIAN: Remove dead code 2019-07-27 07:23:09 +03:00
Cameron Cawley
ecd89808c4 BACKENDS: Avoid redundant format changes on Dingux and LinuxMoto 2019-07-27 07:11:57 +03:00
Filippos Karapetis
d524d36a6a OPENGL: Specify a GLSL version tag, and rename reserved keywords
The GLSL version code has been taken from ResidualVM. The variable
'texture' is now a reserved keyword in GLSL 3.00, so it has been
renamed. This fixes compilation issues in AmigaOS4 (PR 1554).
2019-07-14 16:10:55 +03:00
Cameron Cawley
6e690c5a8b MAEMO: Minor cleanup 2019-07-08 11:11:45 -05:00
Cameron Cawley
16f8c024d1 OPENGLSDL: Move stretch mode handling into OpenGLGraphicsManager 2019-06-24 02:19:28 +03:00
Cameron Cawley
0ddfe927ce OPENGLSDL: Move getSupportedFormats into OpenGLGraphicsManager 2019-06-22 01:15:39 +03:00
Cameron Cawley
bcef809e61 WINCE: Fix compilation 2019-04-15 08:06:39 +03:00
Cameron Cawley
c21090ea03 BACKENDS: Simplify setGraphicsMode on GPH, Dingux and LinuxMoto 2019-04-07 20:52:39 +03:00
Cameron Cawley
e40cdea6ba
SDL: Use Common::KEYCODE_KP_ENTER instead of SDLK_KP_ENTER 2019-04-02 22:41:21 +01:00
Cameron Cawley
62fc4c94bf SDL: Fix compilation without 16 bit colour support 2019-03-31 15:03:09 +03:00
Filippos Karapetis
769cf5492c SDL: Wrap the full screen toggle code into a separate function 2019-03-10 18:32:13 +02:00
Cameron Cawley
f426ba6c36 SDL: Move fullscreen and screenshot event handling to SdlGraphicsManager (#1522) 2019-03-10 18:25:25 +02:00
Cameron Cawley
342733cee6 SDL: Add a function to convert from SDL_PixelFormat to Graphics::PixelFormat 2019-03-03 13:44:10 +01:00
Cameron Cawley
205df5dbdf IMAGE: Fix taking screenshots on big endian systems 2019-03-02 07:29:22 +01:00
Cameron Cawley
8ae17b481a IMAGE: Move bitmap writing code out of OpenGLGraphicsManager 2019-03-02 07:29:22 +01:00
gameblabla
b0803118da DINGUX: Fix dinguxsdl graphics backend 2019-02-13 04:35:12 +00:00
Thierry Crozat
3b542cea53 SURFACESDL: Respect filtering setting when performing aspect ratio correction 2018-10-24 23:34:41 +02:00
Bastien Bouclet
3376597abd OPENGL: Use premultiplied alpha for color-keyed cursors
This fixes colour fringing on keyed cursors when using filtering.

Fixes Trac#10594.
2018-08-26 21:08:40 +02:00
Eugene Sandulenko
23aa8a5d13 DINGUX: Fix initSize() method signature 2018-08-18 14:05:02 +02:00
Matthew Stewart
a5a45fdae1 SDL: Clip mouse range in convertVirtualToWindow 2018-07-08 22:30:31 +01:00
Matthew Stewart
a382a6dd30 SDL: Clip mouse range in convertWindowToVirtual
When the graphics scale was 2x or higher, it was possible for the mouse
to pass the size of the screen specified by "initSize".
2018-07-08 22:30:31 +01:00
Cameron Cawley
d93fe85994 BACKENDS: Fix compilation with SDL 1.2 2018-07-08 22:20:28 +01:00
Thierry Crozat
89f1b1c96e GUI: Add Stretch Mode selection in Options dialog 2018-07-08 16:54:51 +01:00
Thierry Crozat
812ce59ee4 SDL: Implement stretch mode API
Four modes are supported:
 - Use original size with no scaling
 - Scale by an integral amount as much as possible but not bigger
   than the window.
 - Scale to fit the window while respecting the aspect ratio. There
   may be black bars on the left and right, or on the top and bottom,
   but not both. This is the default, and the old behaviour.
 - Scale and stretch to fit the window. In this mode the aspecy ratio
   is not respected and there is no black bars.
The mode is controled by the "scaling_mode" value (between 0 and 3) in
the config file.

Also add Crtl-Alt-s hotkey to cycle through scaling modes
2018-07-08 16:54:51 +01:00
Thierry Crozat
8526c2c31a OSYSTEM: Add Stretch Mode API 2018-07-08 16:54:51 +01:00
Adrian Frühwirth
cee4d6b853 JANITORIAL: Fix trailing whitespace 2018-05-24 15:30:55 +02:00
Eugene Sandulenko
d6b5e3f611 BAKCENDS: Mark methods as override 2018-03-28 11:58:35 +02:00
rsn8887
9af2b5ca3a PSP2: fix touch sometimes not directly under finger 2018-03-20 03:14:11 -05:00
rsn8887
68274d1cc6 PSP2: Improve direct touch accuracy 2018-01-27 19:02:59 -06:00
rsn8887
3978a82650 SURFACESDL: Remove erroneous override declarations 2018-01-17 19:06:12 -06:00
rsn8887
6f2a8bdbca PSP2: remove code duplication in psp2 graphicsmanager 2018-01-17 18:52:48 -06:00
Tarek Soliman
f285e384da GRAPHICS: Fix rounding error when using non-integral scaling
When a non-integral scaling was being used, x and/or y cursor position would be
one less than what it should be.

Fixes Trac#10401

Thanks snover!
2018-01-12 22:43:00 -06:00
Bastien Bouclet
ae634388e9 SDL: Enable the startup fullscreen hack for X11 only
It causes problems on AmigaOS and Linux/SDL2/Vivante
2017-12-10 15:23:16 +01:00
Colin Snover
a5bc89102e ALL: Remove obsolete register keyword
The register keyword was deprecated from the C++11 standard,
<http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4193.html#809>,
and removed from the C++17 standard,
<http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/n4340>, so
cannot exist in a well-formed C++17 program.

It has never done anything in GCC
<https://gcc.gnu.org/ml/gcc/2010-05/msg00113.html>
and because of the way it is specified in the standard, it is “as
meaningful as whitespace”
<http://www.drdobbs.com/keywords-that-arent-or-comments-by-anoth/184403859>.

The one remaining use of the register keyword is in the DS backend,
where it is used to create a local register variable using the
non-standard GCC Extended Asm feature.

Closes gh-1079.
2017-12-03 20:27:42 -06:00
Colin Snover
20b2c1b7e1 SDL: Fix memory corruption when switching to/from 32-bit cursors
When a 32-bit cursor has the same size as an 8- or 16-bit cursor,
the mouse surfaces were not being regenerated even though the
32-bit cursors have a different memory requirement. This lead to
memory corruption as an inappropriate surface would be used for
the other type of cursor.

The shoe-horned 32-bit cursor support is clearly showing its
scrappy nature here and probably ought to be revisited in the
future if the SurfaceSdl graphics manager sticks around.

Fixes Trac#10349, Trac#10350, Trac#10351.
2017-12-03 12:33:05 -06:00
rsn8887
c78fa86860 PSP2: fix clipping and display quality for odd resolutions (Phantasmagoria) 2017-12-02 13:00:22 -06:00
rsn8887
d73437c293 PSP2: fix odd resolutions on PSP2, fixes Phantasmagoria 2017-12-02 11:53:23 -06:00
Colin Snover
5c855a0a5a BACKENDS: Fix shake position getting stuck
If a game is doing a screen shake (for example, DOTT when the
stereo is on), and the user does an RTL, the screen shake offset
may get stuck if the engine does not reset it on shutdown. To
avoid this in all cases, just always reset the screen shake
whenever the graphics manager is told to switch to a new graphics
mode.
2017-12-01 19:43:12 -06:00
Bastien Bouclet
779b97ee3f SDL: Don't use the window size hint for fullscreen
Prevents the opengl backend from changing mode when entering fullscreen
for games with a window size hint.

Fixes #10335. Closes gh-1074.
2017-11-29 16:49:32 -06:00
Colin Snover
c278677d07 SDL: Store fake mouse warp event in virtual coordinates
Normally, notifyMousePosition converts real mouse events into the
virtual coordinate system, but events only get sent through
notifyMousePosition if they are real events from SDL since that
method also decides if the real mouse is inside the content area or
not. As such, these fake events need to be pre-converted to virtual
coordinates or else the wrong values are sent through to the engine
when a scaler or AR correction is in use.
2017-11-27 20:39:21 -06:00