mirror of https://github.com/stella-emu/stella.git
Changed 'gl_fsmax' to mean "use desktop resolution in fullscreen OpenGL mode".
For OS's that don't support it, use the maximum resolution possible. git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@354 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
parent
54f1aaa63f
commit
b46caf3cc7
|
@ -217,7 +217,11 @@
|
|||
<ul>
|
||||
<li>Updated the sound system. All popping and cracking sounds that previously
|
||||
occurred at program start/stop and when entering/exiting menu or pause mode
|
||||
have been eliminated.</li>
|
||||
has been eliminated.</li>
|
||||
|
||||
<li>Fixed the <b>gl_fsmax</b> argument to mean "switch to desktop resolution
|
||||
on fullscreen OpenGL", instead of to the maximum possible resolution
|
||||
(the two are not always the same).</li>
|
||||
|
||||
<li>Added <b>Alt [</b> and <b>Alt ]</b> keys to dynamically adjust the
|
||||
sound volume during emulation.</li>
|
||||
|
@ -225,7 +229,7 @@
|
|||
<li>Added <b>Control 0</b>, <b>Control 1</b>, <b>Control 2</b>, <b>Control 3</b>
|
||||
keys to dynamically change which paddle the mouse should emulate.</li>
|
||||
|
||||
<li>Added <b>-video_driver</b> argument. This accepts the different options
|
||||
<li>Added <b>video_driver</b> argument. This accepts the different options
|
||||
that can be specified for SDL_VIDEODRIVER (see SDL homepage for more
|
||||
information). Basically, it eliminates the need to set the SDL_VIDEODRIVER
|
||||
environment variable.</li>
|
||||
|
@ -554,9 +558,9 @@
|
|||
|
||||
<tr>
|
||||
<td><pre>-gl_fsmax <0|1></pre></td>
|
||||
<td>Use the maximum possible resolution when switching to fullscreen OpenGL
|
||||
mode. Under Linux (and Windows on laptops), this is usually the current
|
||||
desktop resolution, so a video-mode switch can be avoided.</td>
|
||||
<td>Use the current desktop resolution when switching to fullscreen OpenGL
|
||||
mode (so a video-mode switch can be avoided). If not supported, then
|
||||
use the maximum possible resolution available.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
// See the file "license" for information on usage and redistribution of
|
||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
//
|
||||
// $Id: FrameBufferGL.cxx,v 1.9 2005-01-04 19:59:12 stephena Exp $
|
||||
// $Id: FrameBufferGL.cxx,v 1.10 2005-01-04 21:04:20 stephena Exp $
|
||||
//============================================================================
|
||||
|
||||
#include <SDL.h>
|
||||
|
@ -519,9 +519,31 @@ void FrameBufferGL::viewport(uInt32* screenWidth, uInt32* screenHeight,
|
|||
/* cerr << "original image width = " << iwidth << endl
|
||||
<< "original image height = " << iheight << endl
|
||||
<< endl; */
|
||||
uInt32 desktopWidth = this->screenWidth();
|
||||
uInt32 desktopHeight = this->screenHeight();
|
||||
|
||||
if(myConsole->settings().getBool("gl_fsmax") &&
|
||||
myScreenmode != (SDL_Rect**) -1)
|
||||
desktopWidth != 0 && desktopHeight != 0)
|
||||
{
|
||||
// Use the largest available screen size
|
||||
swidth = desktopWidth;
|
||||
sheight = desktopHeight;
|
||||
|
||||
scaleX = float(iwidth) / swidth;
|
||||
scaleY = float(iheight) / sheight;
|
||||
|
||||
// Figure out which dimension is closest to the 10% mark,
|
||||
// and calculate the scaling required to bring it to exactly 10%
|
||||
if(scaleX > scaleY)
|
||||
scale = (swidth * 0.9) / iwidth;
|
||||
else
|
||||
scale = (sheight * 0.9) / iheight;
|
||||
|
||||
iwidth = (Uint16) (scale * iwidth);
|
||||
iheight = (Uint16) (scale * iheight);
|
||||
}
|
||||
else if(myConsole->settings().getBool("gl_fsmax") &&
|
||||
myScreenmode != (SDL_Rect**) -1)
|
||||
{
|
||||
// Use the largest available screen size
|
||||
swidth = myScreenmode[0]->w;
|
||||
|
|
Loading…
Reference in New Issue