OPENGL: Implement aspect ratio support and toggling. Improve fullscreen switching. Fix cursor scaling bug.

Now the hotkey Ctrl-Alt-Enter will switch between all available fullscreen modes. Alt-Enter will only switch to the best mode available, and exit fullscreen mode if already on it.
The different aspect ratios can be switched with Ctrl-Alt-A. The normal mode will stretch the contents to the screen, while other modes will stretch only one dimension to the screen size, and maintain the aspect ratio for the other dimension.

svn-id: r51346
This commit is contained in:
Alejandro Marzini 2010-07-27 07:30:56 +00:00
parent 591b371f2b
commit 2636ac4f36
5 changed files with 190 additions and 71 deletions

View file

@ -133,6 +133,7 @@ protected:
kAspectRatioNone,
kAspectRatioConserve,
kAspectRatio4_3,
kAspectRatio16_9,
kAspectRatio16_10
};
@ -140,6 +141,7 @@ protected:
bool setup;
bool fullscreen;
int activeFullscreenMode;
int aspectRatioCorrection;
int mode;
@ -162,7 +164,16 @@ protected:
virtual void unloadGFXMode();
virtual void setScale(int newScale);
int _aspectX;
int _aspectY;
int _aspectWidth;
int _aspectHeight;
virtual void setAspectRatioCorrection(int mode);
virtual void refreshAspectRatio();
virtual Common::String getAspectRatioName();
virtual float getAspectRatio();
bool _formatBGR;