Commit Graph

263 Commits

Author SHA1 Message Date
Willem Jan Palenstijn
297d15e122 OPENGL: Don't force alpha to 1
This was likely a hack to work around an alpha blending bug in the
gui vector renderer.
2012-02-20 22:17:33 +01:00
Thierry Crozat
7a3df4681b NULL: Fix compiler errors when using the NullGraphicsManager
The errors fixed are inaccessible base class when trying to set the
_graphicsManager and a pure virtual function when trying to create
the NullGraphicsManager instance.
2012-02-19 18:41:49 +00:00
Johannes Schickel
37e5b209a7 OPENGL: More formatting fixes. 2012-02-15 02:23:54 +01:00
Johannes Schickel
b6f7d69709 OPENGLSDL: Remove HACK in fullscreen toggle mode.
Altering the fullscreen state will automatically force a refresh now.
2012-02-15 02:23:47 +01:00
Johannes Schickel
5b3ebdf43d OPENGL: Prevent access to a few more members in the SDL OpenGL code. 2012-02-15 02:23:37 +01:00
Johannes Schickel
05af37c08e OPENGL: Use tabs instead of spaces for indentation. 2012-02-15 02:23:22 +01:00
Johannes Schickel
97760ff101 OPENGLSDL: Don't cast EventType into int for switch. 2012-02-15 02:23:14 +01:00
Johannes Schickel
1f01fb330c OPENGL: Use C-style casts. 2012-02-15 02:23:08 +01:00
Johannes Schickel
e5d48797d9 OPENGL: Let getGlErrStr return a Common::String.
This also makes getGlErrStr use Common::String::format instead of snprintf.
2012-02-15 02:23:01 +01:00
Johannes Schickel
beab93e746 OPENGL: Slight formatting fixes. 2012-02-15 02:22:54 +01:00
Johannes Schickel
864eec8cd2 OPENGL: Make all GLTexture members private. 2012-02-15 02:22:45 +01:00
Johannes Schickel
93435b2e3f OPENGL: Unvirtualize all GLTexture methods. 2012-02-15 02:22:37 +01:00
Johannes Schickel
56971f11d1 OPENGL: Remove redundant check in adjustMousePosition. 2012-02-15 02:22:30 +01:00
Johannes Schickel
90178d9b87 OPENGL: Fix mouse cursor scaling. 2012-01-03 04:19:08 +01:00
Johannes Schickel
772aecf5f8 OPENGLSDL: Simplify the code a bit. 2011-12-15 21:53:09 +01:00
Johannes Schickel
c91b6d7d35 OPENGLSDL: Fix video mode initialization for 640x400 games with AR enabled.
Formerly they always used a height of 240 * scaleFactor, which would for
exmaple make the games requesting a 1x scaler use a height of 240 if AR
is enabled.

This was a regression from b8dcd9a25e.
2011-12-15 21:48:14 +01:00
Tarek Soliman
fda6e1534b MAEMO: Fix zoom key capture on N900 (fixes bug#3443037)
This was semi-intentionally skipped in the intial port revival
because the focus was on N810 at the time.

This is mostly copied from the old 1.2.1 port and then cleaned up.
2011-11-29 14:39:15 -06:00
Tarek Soliman
29c0386f2c MAEMO: Add basic graphics manager 2011-11-29 13:38:17 -06:00
Johannes Schickel
949b30dc36 OPENGL: Always set the unpack alignment when refreshing the textures.
This should hopefully make sure we are always having the correct alignment set
up. This might fix bug #3435655 "OpenGL display corruption with various Sierra
games Daily B.".
2011-11-09 18:57:13 +01:00
David-John Willis
a27c2b401c OPENPANDORA: Cleanup the format of code a little to match our Code Formatting Conventions.
* No functional changes.
* Automated astyle pass.
2011-10-10 21:18:07 +01:00
David-John Willis
6269dcdd3c GPH: Cleanup the format of code to match our Code Formatting Conventions.
* No functional changes.
2011-10-03 13:43:42 +01:00
David-John Willis
fc551cf1ad GPH: Cleanup loadGFXMode(). 2011-10-03 12:37:46 +01:00
David-John Willis
69683b8ee0 SURFACESDL: Stop forceful resetting of _videoMode.hardware* when calling SurfaceSdlGraphicsManager::loadGFXMode() for the GPH backend.
* Note: This really should be cleaned up and all backends that have a custom loadGFXMode() really should setup their own _videoMode.hardware* settings. Assuming the overlay will always match the hardware is flawed logic on devices with fixed hardware screens.
* Just done for the GPH backend for now to cut down on the regresion risk to other backends near the 1.4.0 release cycle.
2011-10-03 12:24:25 +01:00
Johannes Schickel
325addff0c OPENGLSDL: Make fullscreen mode switching work again. 2011-09-23 19:45:44 +02:00
Chris Warren-Smith
c39b7491e6 BADA: Remove incorrect BADA defined check 2011-08-21 11:46:37 +02:00
Chris Warren-Smith
812e4498ec BADA: Fix formatting and non bada host compile error 2011-08-21 16:38:53 +10:00
Chris Warren-Smith
59739a7a0e BADA: Initial BADA port implementation 2011-08-21 16:37:06 +10:00
Johannes Schickel
dd0ad3cba4 SDL: Fix typo. 2011-08-18 23:18:20 +02:00
Johannes Schickel
b8dcd9a25e OPENGL: Fix aspect ratio correction behavior.
Now only 320x200 and 640x400 will result in aspect ratio correction to be used
if the user requested it. This should fix some strechting in Myst/Riven.
2011-08-12 04:06:54 +02:00
Johannes Schickel
a77c29327e OPENGLSDL: Do not change requested window size on resize.
This should help fix a lock up on window managers, which will try to force the
ScummVM window to a certain size, by just requesting the same size over and
over again.

Now we get black borders even in windowed mode when the aspect of the window
does not match the aspect of the game screen (and we are not in "normal" mode),
but that is usually the same in video players too, so shouldn't be too bad.
2011-08-12 03:46:32 +02:00
Johannes Schickel
0f6e231356 SDL: Implement a hellish workaround to fix bug #3368143.
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-11 04:28:44 +02:00
Johannes Schickel
a72ab2f448 BACKENDS: Fix compilation. 2011-08-09 14:56:38 +02:00
Fabio Battaglia
3fe81198ff DINGUX: hopefully fix the cursor palette problem
The port wasn't keeping track of the CursorPalette feature
correctly. This should fix it for good.
2011-08-09 14:06:31 +02:00
Fabio Battaglia
521dfaa980 DINGUX: fix compilation 2011-08-09 11:19:18 +02:00
Johannes Schickel
06b95b3543 OPENGL: Add include guard to gltexture.h 2011-08-09 02:14:12 +02:00
Filippos Karapetis
ef695cb7dd OPENGL: Added a temporary hack to fix compilation under Windows, after the latest changes to the SDL interface layer 2011-08-09 02:24:59 +03:00
Johannes Schickel
fd61a83bb5 SDL: Slight clean up in the surface based graphics manager. 2011-08-09 00:04:19 +02:00
Johannes Schickel
04ab0e58b4 SDL: Take advantage of SdlGraphicsManager.
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-09 00:03:11 +02:00
Johannes Schickel
0630a88a04 SDL: Let SDL based graphics managers inherit from SdlGraphicsManager.
This also adapts port I can not test (not even the compilation). So if this
breaks anything I am sorry about it.
2011-08-09 00:03:11 +02:00
Johannes Schickel
dedc74abfa SDL: Add a new base class for graphics managers utilizing SDL. 2011-08-09 00:03:10 +02:00
Johannes Schickel
222064cdb6 BACKENDS: Add PaletteManager interface as comments to GraphicsManager.
This should be a little more comfortable about finding out what's needed to
implement a new graphics manager.
2011-08-09 00:03:10 +02:00
Christoph Mallon
23a0f5318c JANITORIAL: Remove trailing empty lines. 2011-08-07 13:53:33 +02:00
Bastien Bouclet
0b1cb0ebbb SDL: Remove an unnecessary memset 2011-07-02 22:14:13 +02:00
Bastien Bouclet
a360a64dd7 SDL: Set a black palette by default.
This fixes white flashing screens when using SDL 1.3.
SDL 1.3 palettes are all white by default, whereas
SDL 1.2 palettes are all black ...
2011-07-02 22:01:45 +02:00
CeRiAl
0a9b9fe08f WINCE: Added option to disable panel toggling with double tap on top of screen 2011-06-27 02:22:24 +02:00
CeRiAl
eb8db120b2 WINCE: Hide toolbar when returning to game list 2011-06-25 01:06:41 +02:00
Max Horn
88913c0139 ALL: Remove trailing whitespaces
This tries to make our code a bit more compliant with our code formatting
conventions. For future use, this is the command I used:
  git ls-files "*.cpp" "*.h" | xargs sed -i -e 's/[ \t]*$//'
2011-06-20 00:59:48 +02:00
Johannes Schickel
80b336f796 SDL: Replace some SdlGraphicsManager uses with SurfaceSdlGraphicsManager. 2011-06-19 20:20:13 +02:00
Johannes Schickel
1c21232416 SDL: Rename SdlGraphicsManager to SurfaceSdlGraphicsManager to reflect its purpose.
Hopefully I catched all uses of the old name in our ports...
2011-06-19 20:10:21 +02:00
Johannes Schickel
f9f16ee358 OPENGLSDL: Add FIXME about desktop resolution retrieving. 2011-06-19 19:12:34 +02:00