mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-06 19:08:15 +00:00
implemented new 'nice' scaler hotkeys
svn-id: r10613
This commit is contained in:
parent
16e4897531
commit
2e27e74fb4
39
README
39
README
@ -423,23 +423,26 @@ Simon the Sorcerer: 1 & 2
|
|||||||
---- -----------------
|
---- -----------------
|
||||||
ScummVM offers several anti-aliasing filters to attempt to improve visual
|
ScummVM offers several anti-aliasing filters to attempt to improve visual
|
||||||
quality. These are the same filters used in many other emulators, such as
|
quality. These are the same filters used in many other emulators, such as
|
||||||
MAME.
|
MAME. These filters take the original game graphics, and scale it by a
|
||||||
Note: the resolutions listed assume the game was originally 320x200
|
certain fixed factor (usually 2x or 3x) before displaying them to you.
|
||||||
|
So for example, if the game originally run at a resolution of 320x200
|
||||||
|
(typical for most of the SCUMM games), then using a filter with scale
|
||||||
|
factor 2x will effectively yield 640x400 graphics. Likewise with a
|
||||||
|
3x filter you'll get 960x600.
|
||||||
|
|
||||||
They are:
|
They are:
|
||||||
normal - No filtering, original 320x200 resolution. Fastest.
|
normal - No filtering, no scaling. Fastest.
|
||||||
2x - No filtering, double screen/window size to 640x400
|
2x - No filtering, factor 2x (default).
|
||||||
(default)
|
3x - No filtering, factor 3x.
|
||||||
3x - No filtering, triple screen/window size to 960x600
|
2xsai - 2xsai filter, factor 2x.
|
||||||
2xsai - 2xsai filtering, double screen/window size to 640x400
|
super2xsai - Enhanced 2xsai filtering, factor 2x.
|
||||||
super2xsai - Enhanced 2xsai filtering. 640x400 screen/window size
|
supereagle - Less blurry than 2xsai, but slower. Factor 2x.
|
||||||
supereagle - Less blurry than 2xsai, but slower. Also 640x400
|
advmame2x - Doesn't rely on blurring like 2xSAI, fast. Factor 2x.
|
||||||
advmame2x - 640x400 scaling. Doesn't rely on blurring like 2xSAI.
|
advmame3x - Doesn't rely on blurring like 2xSAI, fast. Factor 3x.
|
||||||
advmame3x - 960x600 scaling. Doesn't rely on blurring like 2xSAI.
|
hq2x - Very nice high quality filter but slow. Factor 2x.
|
||||||
hq2x - 640x400 scaling. Doesn't rely on blurring like 2xSAI.
|
hq3x - Very nice high quality filter but slow. Factor 3x.
|
||||||
hq3x - 960x600 scaling. Doesn't rely on blurring like 2xSAI.
|
tv2x - Interlace filter, tries to emulate a TV. Factor 2x.
|
||||||
tv2x - 640x400 scaling. Horizontal scanlines.
|
dotmatrix - Dot matrix effect. Factor 2x.
|
||||||
dotmatrix - 640x400 scaling. Dot matrix effect.
|
|
||||||
opengl - OpenGL with bilinear filtering [Unsupported]
|
opengl - OpenGL with bilinear filtering [Unsupported]
|
||||||
|
|
||||||
To select a graphics filter, pass its name via the '-g' option to scummvm,
|
To select a graphics filter, pass its name via the '-g' option to scummvm,
|
||||||
@ -470,9 +473,9 @@ simon games.
|
|||||||
Common:
|
Common:
|
||||||
Ctrl-z OR Alt-x - Quit
|
Ctrl-z OR Alt-x - Quit
|
||||||
Keyboard Arrow Keys - Simulate mouse movement
|
Keyboard Arrow Keys - Simulate mouse movement
|
||||||
Ctrl-f - Runs in fast mode.
|
Ctrl-f - Toggle fast mode.
|
||||||
Ctrl-Alt 0-9 - Switch between graphics filters
|
Ctrl-Alt 1-8 - Switch between graphics filters
|
||||||
Ctrl-Alt c-d - Switch between other graphics filters
|
Ctrl-Alt + and - - Increase/Decrease the scale factor
|
||||||
Ctrl-Alt b - Switch between bilinear and non-linear
|
Ctrl-Alt b - Switch between bilinear and non-linear
|
||||||
filtering [OpenGL backend]
|
filtering [OpenGL backend]
|
||||||
Ctrl-Alt a - Toggle aspect-ratio correction on/off.
|
Ctrl-Alt a - Toggle aspect-ratio correction on/off.
|
||||||
|
37
TODO
37
TODO
@ -6,15 +6,6 @@ General
|
|||||||
* Revise the way "quit" is handled. Maybe add a global variable "g_quit" which
|
* Revise the way "quit" is handled. Maybe add a global variable "g_quit" which
|
||||||
we set when the application should be quit (e.g. when an EVENT_QUIT is
|
we set when the application should be quit (e.g. when an EVENT_QUIT is
|
||||||
received). This is useful if multiple levels of event loops have to be ended
|
received). This is useful if multiple levels of event loops have to be ended
|
||||||
* Add API to query backend for a list of available music engines
|
|
||||||
Useful for Options dialog
|
|
||||||
* Add API to query backend for a list of available scalers/screenmodes
|
|
||||||
(that is, a list of user presentable names, and corresponding PROP_SET_GFX_MODE
|
|
||||||
values). This is useful for the options dialog
|
|
||||||
* Add PROP_GET_GFX_MODE (mirroring PROP_SET_GFX_MODE)
|
|
||||||
* Consider replacing the PROP_TOGGLE_* properties with GET/SET ones ->
|
|
||||||
this allows more control over these properties (like, it allows the GUI to
|
|
||||||
display checkboxes for these in the options dialog)
|
|
||||||
* gameDetector.cpp is quite messy. Also, it makes providing native GUI front
|
* gameDetector.cpp is quite messy. Also, it makes providing native GUI front
|
||||||
ends for ScummVM unnecessarily cumbersome (think of systems which don't
|
ends for ScummVM unnecessarily cumbersome (think of systems which don't
|
||||||
even have a command line, like classic MacOS). It would be nice to better
|
even have a command line, like classic MacOS). It would be nice to better
|
||||||
@ -118,30 +109,24 @@ Descumm
|
|||||||
* Rewrite code to use 2 passes; first pass builds an intermediate graph, the
|
* Rewrite code to use 2 passes; first pass builds an intermediate graph, the
|
||||||
second pass then tries to detect loops, break/continue statements etc.
|
second pass then tries to detect loops, break/continue statements etc.
|
||||||
|
|
||||||
Backend
|
Backends
|
||||||
=======
|
========
|
||||||
* Several of the backend factory functions take config parameters. It should
|
* Several of the backend factory functions take config parameters. It should
|
||||||
be possible to get rid of those once the config system rewrite (see above)
|
be possible to get rid of those once the config system rewrite (see above)
|
||||||
has been done. In that case, the backends simply can query the config
|
has been done. In that case, the backends simply can query the config
|
||||||
manager for these parameters (or any others they might like :-).
|
manager for these parameters (or any others they might like :-).
|
||||||
|
* Add API to query backend for a list of available music engines
|
||||||
|
Useful for Options dialog
|
||||||
|
* Add API to query backend for a list of available scalers/screenmodes
|
||||||
|
(that is, a list of user presentable names, and corresponding PROP_SET_GFX_MODE
|
||||||
|
values). This is useful for the options dialog
|
||||||
|
* Add PROP_GET_GFX_MODE (mirroring PROP_SET_GFX_MODE)
|
||||||
|
* Consider replacing the PROP_TOGGLE_* properties with GET/SET ones ->
|
||||||
|
this allows more control over these properties (like, it allows the GUI to
|
||||||
|
display checkboxes for these in the options dialog)
|
||||||
|
|
||||||
SDL backend
|
SDL backend
|
||||||
===========
|
===========
|
||||||
* Maybe change the shortcuts? One idea (add ctrl-alt in all cases):
|
|
||||||
1-3: select scale factor
|
|
||||||
2-4: normal, advmame, hq filters (all available as 2x and 3x)
|
|
||||||
5-9,0: the other scalers
|
|
||||||
Justification: We have so many scalers now, we are running out of keys
|
|
||||||
for them - and this way, we need a few less. Of course, the question remains
|
|
||||||
what happens if you press ctrl-alt-3 while 2xSai is scaler, what happens?
|
|
||||||
So maybe (again add ctrl-alt):
|
|
||||||
'+' / '-':
|
|
||||||
increase/decrease scale factor, cycling over the possible range.
|
|
||||||
So for a 2x-only scaler, it does nothing; for a scaler supporting
|
|
||||||
all scales from 1x to 4x, it works as usual (and pressing '+' in
|
|
||||||
4x mode goes to 1x)
|
|
||||||
1-9: switch between the "base" scalers: normal (point) scaler, advmame,
|
|
||||||
hq (high quality), 2xsai, super2xsai, supereagle, tv2x, dotmatrix, ...
|
|
||||||
* Fix the "auto dirty rect" computing code - in particular, use a proper checksum
|
* Fix the "auto dirty rect" computing code - in particular, use a proper checksum
|
||||||
algorithm, this should solve many of the problems with some luck
|
algorithm, this should solve many of the problems with some luck
|
||||||
* OpenGL code: either fix it (see open bug tracker items and various hacks in the code),
|
* OpenGL code: either fix it (see open bug tracker items and various hacks in the code),
|
||||||
|
@ -629,13 +629,13 @@ bool OSystem_SDL_Common::poll_event(Event *event) {
|
|||||||
|
|
||||||
#ifdef MACOSX
|
#ifdef MACOSX
|
||||||
// On Macintosh', Cmd-Q quits
|
// On Macintosh', Cmd-Q quits
|
||||||
if ((ev.key.keysym.mod & KMOD_META) && ev.key.keysym.sym=='q') {
|
if ((ev.key.keysym.mod & KMOD_META) && ev.key.keysym.sym == 'q') {
|
||||||
event->event_code = EVENT_QUIT;
|
event->event_code = EVENT_QUIT;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
// Ctrl-z and Alt-X quit
|
// Ctrl-z and Alt-X quit
|
||||||
if ((b == KBD_CTRL && ev.key.keysym.sym=='z') || (b == KBD_ALT && ev.key.keysym.sym=='x')) {
|
if ((b == KBD_CTRL && ev.key.keysym.sym == 'z') || (b == KBD_ALT && ev.key.keysym.sym == 'x')) {
|
||||||
event->event_code = EVENT_QUIT;
|
event->event_code = EVENT_QUIT;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -643,31 +643,76 @@ bool OSystem_SDL_Common::poll_event(Event *event) {
|
|||||||
|
|
||||||
// Ctr-Alt-<key> will change the GFX mode
|
// Ctr-Alt-<key> will change the GFX mode
|
||||||
if (b == (KBD_CTRL|KBD_ALT)) {
|
if (b == (KBD_CTRL|KBD_ALT)) {
|
||||||
const char keys[] = "1234567890cd";
|
static const int gfxModes[][4] = {
|
||||||
char *ptr;
|
{ GFX_NORMAL, GFX_DOUBLESIZE, GFX_TRIPLESIZE, -1 },
|
||||||
|
{ GFX_NORMAL, GFX_ADVMAME2X, GFX_ADVMAME3X, -1 },
|
||||||
|
{ GFX_NORMAL, GFX_HQ2X, GFX_HQ3X, -1 },
|
||||||
|
{ GFX_NORMAL, GFX_2XSAI, -1, -1 },
|
||||||
|
{ GFX_NORMAL, GFX_SUPER2XSAI, -1, -1 },
|
||||||
|
{ GFX_NORMAL, GFX_SUPEREAGLE, -1, -1 },
|
||||||
|
{ GFX_NORMAL, GFX_TV2X, -1, -1 },
|
||||||
|
{ GFX_NORMAL, GFX_DOTMATRIX, -1, -1 }
|
||||||
|
};
|
||||||
|
|
||||||
ptr = strchr(keys, ev.key.keysym.sym);
|
// FIXME EVIL HACK: This shouldn't be a static int, rather it
|
||||||
if (ptr != NULL) {
|
// should be a member variable. Furthermore, it shouldn't be
|
||||||
Property prop;
|
// set in this code, rather it should be set by load_gfx_mode().
|
||||||
|
// But for now this quick&dirty hack works.
|
||||||
|
static int _scalerType = 0;
|
||||||
|
if (_mode != GFX_NORMAL) {
|
||||||
|
// Try to figure out which gfx mode "group" we are in
|
||||||
|
// This is just a temporary hack until the proper solution
|
||||||
|
// (i.e. code in load_gfx_mode()) is in effect.
|
||||||
|
for (int i = 0; i < ARRAYSIZE(gfxModes); i++) {
|
||||||
|
if (gfxModes[i][1] == _mode || gfxModes[i][2] == _mode) {
|
||||||
|
_scalerType = i;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
prop.gfx_mode = ptr - keys;
|
|
||||||
|
Property prop;
|
||||||
|
int factor = _scaleFactor - 1;
|
||||||
|
|
||||||
|
// Ctr-Alt-a toggles aspect ratio correction
|
||||||
|
if (ev.key.keysym.sym == 'a') {
|
||||||
|
property(PROP_TOGGLE_ASPECT_RATIO, NULL);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Ctr-Alt-b changes to bilinear filtering in the OpenGL backend
|
||||||
|
if (ev.key.keysym.sym == 'b') {
|
||||||
|
prop.gfx_mode = GFX_BILINEAR;
|
||||||
property(PROP_SET_GFX_MODE, &prop);
|
property(PROP_SET_GFX_MODE, &prop);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// Ctr-Alt-a will change aspect ratio
|
|
||||||
if (b == (KBD_CTRL|KBD_ALT) && ev.key.keysym.sym=='a') {
|
|
||||||
property(PROP_TOGGLE_ASPECT_RATIO, NULL);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Ctr-Alt-b will change bilinear filtering in OpenGL backend
|
// Increase/decrease the scale factor
|
||||||
if (b == (KBD_CTRL|KBD_ALT) && ev.key.keysym.sym=='b') {
|
// TODO: Shall we 'wrap around' here?
|
||||||
Property prop;
|
if (ev.key.keysym.sym == '+' || ev.key.keysym.sym == '-') {
|
||||||
prop.gfx_mode = GFX_BILINEAR;
|
factor += (ev.key.keysym.sym == '+' ? +1 : -1);
|
||||||
property(PROP_SET_GFX_MODE, &prop);
|
if (0 <= factor && factor < 4 && gfxModes[_scalerType][factor] >= 0) {
|
||||||
break;
|
prop.gfx_mode = gfxModes[_scalerType][factor];
|
||||||
|
property(PROP_SET_GFX_MODE, &prop);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ('1' <= ev.key.keysym.sym && ev.key.keysym.sym <= '9') {
|
||||||
|
_scalerType = ev.key.keysym.sym - '1';
|
||||||
|
if (_scalerType >= ARRAYSIZE(gfxModes))
|
||||||
|
break;
|
||||||
|
|
||||||
|
while (gfxModes[_scalerType][factor] < 0) {
|
||||||
|
assert(factor > 0);
|
||||||
|
factor--;
|
||||||
|
}
|
||||||
|
prop.gfx_mode = gfxModes[_scalerType][factor];
|
||||||
|
property(PROP_SET_GFX_MODE, &prop);
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef QTOPIA
|
#ifdef QTOPIA
|
||||||
|
Loading…
x
Reference in New Issue
Block a user