REMOVED predefined fullscreen modes from menu
REARRANGED video menu FIXED: Switching "Ignore aspect ratio" will not resize the window RENAMED fsMaxScale to maxScale FIXED OpenGL maxScale and aspectRatio switching
This commit is contained in:
parent
3dcb29b208
commit
4705cdf9bb
|
@ -263,36 +263,8 @@ bool Direct3DDisplay::initialize()
|
||||||
DXTRACE_ERR_MSGBOX( _T("Error creating Direct3D object"), 0 );
|
DXTRACE_ERR_MSGBOX( _T("Error creating Direct3D object"), 0 );
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
pD3D->GetAdapterDisplayMode(theApp.fsAdapter, &mode);
|
pD3D->GetAdapterDisplayMode(theApp.fsAdapter, &mode);
|
||||||
|
|
||||||
theApp.mode320Available = FALSE;
|
|
||||||
theApp.mode640Available = FALSE;
|
|
||||||
theApp.mode800Available = FALSE;
|
|
||||||
theApp.mode1024Available = FALSE;
|
|
||||||
theApp.mode1280Available = FALSE;
|
|
||||||
|
|
||||||
unsigned int nModes, i;
|
|
||||||
D3DDISPLAYMODE dm;
|
|
||||||
|
|
||||||
nModes = pD3D->GetAdapterModeCount(theApp.fsAdapter, mode.Format);
|
|
||||||
for( i = 0; i<nModes; i++ )
|
|
||||||
{
|
|
||||||
if( D3D_OK == pD3D->EnumAdapterModes(theApp.fsAdapter, mode.Format, i, &dm) )
|
|
||||||
{
|
|
||||||
if( (dm.Width == 320) && (dm.Height == 240) )
|
|
||||||
theApp.mode320Available = true;
|
|
||||||
if( (dm.Width == 640) && (dm.Height == 480) )
|
|
||||||
theApp.mode640Available = true;
|
|
||||||
if( (dm.Width == 800) && (dm.Height == 600) )
|
|
||||||
theApp.mode800Available = true;
|
|
||||||
if( (dm.Width == 1024) && (dm.Height == 768) )
|
|
||||||
theApp.mode1024Available = true;
|
|
||||||
if( (dm.Width == 1280) && (dm.Height == 1024) )
|
|
||||||
theApp.mode1280Available = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
screenFormat = mode.Format;
|
screenFormat = mode.Format;
|
||||||
|
|
||||||
switch(mode.Format) {
|
switch(mode.Format) {
|
||||||
|
@ -827,8 +799,8 @@ void Direct3DDisplay::calculateDestRect()
|
||||||
float scaleX = (float)dpp.BackBufferWidth / (float)width;
|
float scaleX = (float)dpp.BackBufferWidth / (float)width;
|
||||||
float scaleY = (float)dpp.BackBufferHeight / (float)height;
|
float scaleY = (float)dpp.BackBufferHeight / (float)height;
|
||||||
float min = (scaleX < scaleY) ? scaleX : scaleY;
|
float min = (scaleX < scaleY) ? scaleX : scaleY;
|
||||||
if( theApp.fsMaxScale && (min > theApp.fsMaxScale) ) {
|
if( theApp.maxScale && (min > theApp.maxScale) ) {
|
||||||
min = (float)theApp.fsMaxScale;
|
min = (float)theApp.maxScale;
|
||||||
}
|
}
|
||||||
destRect.left = 0;
|
destRect.left = 0;
|
||||||
destRect.top = 0;
|
destRect.top = 0;
|
||||||
|
|
|
@ -139,12 +139,6 @@ BEGIN_MESSAGE_MAP(MainWnd, CWnd)
|
||||||
ON_UPDATE_COMMAND_UI(ID_OPTIONS_VIDEO_X2, OnUpdateOptionsVideoX2)
|
ON_UPDATE_COMMAND_UI(ID_OPTIONS_VIDEO_X2, OnUpdateOptionsVideoX2)
|
||||||
ON_UPDATE_COMMAND_UI(ID_OPTIONS_VIDEO_X3, OnUpdateOptionsVideoX3)
|
ON_UPDATE_COMMAND_UI(ID_OPTIONS_VIDEO_X3, OnUpdateOptionsVideoX3)
|
||||||
ON_UPDATE_COMMAND_UI(ID_OPTIONS_VIDEO_X4, OnUpdateOptionsVideoX4)
|
ON_UPDATE_COMMAND_UI(ID_OPTIONS_VIDEO_X4, OnUpdateOptionsVideoX4)
|
||||||
ON_UPDATE_COMMAND_UI(ID_OPTIONS_VIDEO_FULLSCREEN320X240, OnUpdateOptionsVideoFullscreen320x240)
|
|
||||||
ON_UPDATE_COMMAND_UI(ID_OPTIONS_VIDEO_FULLSCREEN640X480, OnUpdateOptionsVideoFullscreen640x480)
|
|
||||||
ON_UPDATE_COMMAND_UI(ID_OPTIONS_VIDEO_FULLSCREEN800X600, OnUpdateOptionsVideoFullscreen800x600)
|
|
||||||
ON_COMMAND(ID_OPTIONS_VIDEO_FULLSCREEN320X240, OnOptionsVideoFullscreen320x240)
|
|
||||||
ON_COMMAND(ID_OPTIONS_VIDEO_FULLSCREEN640X480, OnOptionsVideoFullscreen640x480)
|
|
||||||
ON_COMMAND(ID_OPTIONS_VIDEO_FULLSCREEN800X600, OnOptionsVideoFullscreen800x600)
|
|
||||||
ON_COMMAND(ID_OPTIONS_VIDEO_FULLSCREEN, OnOptionsVideoFullscreen)
|
ON_COMMAND(ID_OPTIONS_VIDEO_FULLSCREEN, OnOptionsVideoFullscreen)
|
||||||
ON_UPDATE_COMMAND_UI(ID_OPTIONS_VIDEO_FULLSCREEN, OnUpdateOptionsVideoFullscreen)
|
ON_UPDATE_COMMAND_UI(ID_OPTIONS_VIDEO_FULLSCREEN, OnUpdateOptionsVideoFullscreen)
|
||||||
ON_WM_MOVING()
|
ON_WM_MOVING()
|
||||||
|
@ -388,10 +382,6 @@ BEGIN_MESSAGE_MAP(MainWnd, CWnd)
|
||||||
ON_MESSAGE(WM_SYSCOMMAND, OnMySysCommand)
|
ON_MESSAGE(WM_SYSCOMMAND, OnMySysCommand)
|
||||||
ON_COMMAND(ID_OPTIONS_SOUND_HARDWAREACCELERATION, &MainWnd::OnOptionsSoundHardwareacceleration)
|
ON_COMMAND(ID_OPTIONS_SOUND_HARDWAREACCELERATION, &MainWnd::OnOptionsSoundHardwareacceleration)
|
||||||
ON_UPDATE_COMMAND_UI(ID_OPTIONS_SOUND_HARDWAREACCELERATION, &MainWnd::OnUpdateOptionsSoundHardwareacceleration)
|
ON_UPDATE_COMMAND_UI(ID_OPTIONS_SOUND_HARDWAREACCELERATION, &MainWnd::OnUpdateOptionsSoundHardwareacceleration)
|
||||||
ON_COMMAND(ID_OPTIONS_VIDEO_FULLSCREEN1280X1024, OnOptionsVideoFullscreen1280x1024)
|
|
||||||
ON_COMMAND(ID_OPTIONS_VIDEO_FULLSCREEN1024X768, OnOptionsVideoFullscreen1024x768)
|
|
||||||
ON_UPDATE_COMMAND_UI(ID_OPTIONS_VIDEO_FULLSCREEN1024X768, OnUpdateOptionsVideoFullscreen1024x768)
|
|
||||||
ON_UPDATE_COMMAND_UI(ID_OPTIONS_VIDEO_FULLSCREEN1280X1024, OnUpdateOptionsVideoFullscreen1280x1024)
|
|
||||||
ON_COMMAND(ID_OPTIONS_FILTER_LCDCOLORS, OnOptionsFilterLcdcolors)
|
ON_COMMAND(ID_OPTIONS_FILTER_LCDCOLORS, OnOptionsFilterLcdcolors)
|
||||||
ON_UPDATE_COMMAND_UI(ID_OPTIONS_FILTER_LCDCOLORS, OnUpdateOptionsFilterLcdcolors)
|
ON_UPDATE_COMMAND_UI(ID_OPTIONS_FILTER_LCDCOLORS, OnUpdateOptionsFilterLcdcolors)
|
||||||
ON_COMMAND(ID_OUTPUTAPI_DIRECTSOUND, &MainWnd::OnOutputapiDirectsound)
|
ON_COMMAND(ID_OUTPUTAPI_DIRECTSOUND, &MainWnd::OnOutputapiDirectsound)
|
||||||
|
|
|
@ -143,12 +143,6 @@ protected:
|
||||||
afx_msg void OnUpdateOptionsVideoX2(CCmdUI* pCmdUI);
|
afx_msg void OnUpdateOptionsVideoX2(CCmdUI* pCmdUI);
|
||||||
afx_msg void OnUpdateOptionsVideoX3(CCmdUI* pCmdUI);
|
afx_msg void OnUpdateOptionsVideoX3(CCmdUI* pCmdUI);
|
||||||
afx_msg void OnUpdateOptionsVideoX4(CCmdUI* pCmdUI);
|
afx_msg void OnUpdateOptionsVideoX4(CCmdUI* pCmdUI);
|
||||||
afx_msg void OnUpdateOptionsVideoFullscreen320x240(CCmdUI* pCmdUI);
|
|
||||||
afx_msg void OnUpdateOptionsVideoFullscreen640x480(CCmdUI* pCmdUI);
|
|
||||||
afx_msg void OnUpdateOptionsVideoFullscreen800x600(CCmdUI* pCmdUI);
|
|
||||||
afx_msg void OnOptionsVideoFullscreen320x240();
|
|
||||||
afx_msg void OnOptionsVideoFullscreen640x480();
|
|
||||||
afx_msg void OnOptionsVideoFullscreen800x600();
|
|
||||||
afx_msg void OnOptionsVideoFullscreen();
|
afx_msg void OnOptionsVideoFullscreen();
|
||||||
afx_msg void OnUpdateOptionsVideoFullscreen(CCmdUI* pCmdUI);
|
afx_msg void OnUpdateOptionsVideoFullscreen(CCmdUI* pCmdUI);
|
||||||
afx_msg void OnMove(int x, int y);
|
afx_msg void OnMove(int x, int y);
|
||||||
|
@ -343,10 +337,6 @@ protected:
|
||||||
afx_msg void OnUpdateOptionsFilterLcdcolors(CCmdUI *pCmdUI);
|
afx_msg void OnUpdateOptionsFilterLcdcolors(CCmdUI *pCmdUI);
|
||||||
afx_msg void OnOptionsSoundHardwareacceleration();
|
afx_msg void OnOptionsSoundHardwareacceleration();
|
||||||
afx_msg void OnUpdateOptionsSoundHardwareacceleration(CCmdUI *pCmdUI);
|
afx_msg void OnUpdateOptionsSoundHardwareacceleration(CCmdUI *pCmdUI);
|
||||||
afx_msg void OnOptionsVideoFullscreen1280x1024();
|
|
||||||
afx_msg void OnOptionsVideoFullscreen1024x768();
|
|
||||||
afx_msg void OnUpdateOptionsVideoFullscreen1024x768(CCmdUI *pCmdUI);
|
|
||||||
afx_msg void OnUpdateOptionsVideoFullscreen1280x1024(CCmdUI *pCmdUI);
|
|
||||||
afx_msg void OnLinkOptions();
|
afx_msg void OnLinkOptions();
|
||||||
afx_msg void OnOptionsLinkLog() ;
|
afx_msg void OnOptionsLinkLog() ;
|
||||||
afx_msg void OnUpdateOptionsLinkLog(CCmdUI* pCmdUI) ;
|
afx_msg void OnUpdateOptionsLinkLog(CCmdUI* pCmdUI) ;
|
||||||
|
|
|
@ -269,69 +269,12 @@ void MainWnd::OnUpdateOptionsVideoX4(CCmdUI* pCmdUI)
|
||||||
pCmdUI->SetCheck(theApp.videoOption == VIDEO_4X);
|
pCmdUI->SetCheck(theApp.videoOption == VIDEO_4X);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWnd::OnUpdateOptionsVideoFullscreen320x240(CCmdUI* pCmdUI)
|
|
||||||
{
|
|
||||||
pCmdUI->Enable(theApp.mode320Available);
|
|
||||||
pCmdUI->SetCheck(theApp.videoOption == VIDEO_320x240);
|
|
||||||
}
|
|
||||||
|
|
||||||
void MainWnd::OnUpdateOptionsVideoFullscreen640x480(CCmdUI* pCmdUI)
|
|
||||||
{
|
|
||||||
pCmdUI->Enable(theApp.mode640Available);
|
|
||||||
pCmdUI->SetCheck(theApp.videoOption == VIDEO_640x480);
|
|
||||||
}
|
|
||||||
|
|
||||||
void MainWnd::OnUpdateOptionsVideoFullscreen800x600(CCmdUI* pCmdUI)
|
|
||||||
{
|
|
||||||
pCmdUI->Enable(theApp.mode800Available);
|
|
||||||
pCmdUI->SetCheck(theApp.videoOption == VIDEO_800x600);
|
|
||||||
}
|
|
||||||
|
|
||||||
void MainWnd::OnUpdateOptionsVideoFullscreen1024x768(CCmdUI *pCmdUI)
|
|
||||||
{
|
|
||||||
pCmdUI->Enable(theApp.mode1024Available);
|
|
||||||
pCmdUI->SetCheck(theApp.videoOption == VIDEO_1024x768);
|
|
||||||
}
|
|
||||||
|
|
||||||
void MainWnd::OnUpdateOptionsVideoFullscreen1280x1024(CCmdUI *pCmdUI)
|
|
||||||
{
|
|
||||||
pCmdUI->Enable(theApp.mode1280Available);
|
|
||||||
pCmdUI->SetCheck(theApp.videoOption == VIDEO_1280x1024);
|
|
||||||
}
|
|
||||||
|
|
||||||
BOOL MainWnd::OnOptionVideoSize(UINT nID)
|
BOOL MainWnd::OnOptionVideoSize(UINT nID)
|
||||||
{
|
{
|
||||||
theApp.updateVideoSize(nID);
|
theApp.updateVideoSize(nID);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MainWnd::OnOptionsVideoFullscreen320x240()
|
|
||||||
{
|
|
||||||
OnOptionVideoSize(ID_OPTIONS_VIDEO_FULLSCREEN320X240);
|
|
||||||
}
|
|
||||||
|
|
||||||
void MainWnd::OnOptionsVideoFullscreen640x480()
|
|
||||||
{
|
|
||||||
OnOptionVideoSize(ID_OPTIONS_VIDEO_FULLSCREEN640X480);
|
|
||||||
}
|
|
||||||
|
|
||||||
void MainWnd::OnOptionsVideoFullscreen800x600()
|
|
||||||
{
|
|
||||||
OnOptionVideoSize(ID_OPTIONS_VIDEO_FULLSCREEN800X600);
|
|
||||||
}
|
|
||||||
|
|
||||||
void MainWnd::OnOptionsVideoFullscreen1024x768()
|
|
||||||
{
|
|
||||||
OnOptionVideoSize(ID_OPTIONS_VIDEO_FULLSCREEN1024X768);
|
|
||||||
}
|
|
||||||
|
|
||||||
void MainWnd::OnOptionsVideoFullscreen1280x1024()
|
|
||||||
{
|
|
||||||
OnOptionVideoSize(ID_OPTIONS_VIDEO_FULLSCREEN1280X1024);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void MainWnd::OnOptionsVideoFullscreen()
|
void MainWnd::OnOptionsVideoFullscreen()
|
||||||
{
|
{
|
||||||
IDisplay::VIDEO_MODE mode;
|
IDisplay::VIDEO_MODE mode;
|
||||||
|
@ -379,11 +322,7 @@ void MainWnd::OnUpdateOptionsVideoDisablesfx(CCmdUI* pCmdUI)
|
||||||
void MainWnd::OnOptionsVideoFullscreenstretchtofit()
|
void MainWnd::OnOptionsVideoFullscreenstretchtofit()
|
||||||
{
|
{
|
||||||
theApp.fullScreenStretch = !theApp.fullScreenStretch;
|
theApp.fullScreenStretch = !theApp.fullScreenStretch;
|
||||||
theApp.updateWindowSize( theApp.videoOption );
|
|
||||||
if( theApp.display ) {
|
if( theApp.display ) {
|
||||||
if( emulating ) {
|
|
||||||
theApp.display->clear( );
|
|
||||||
}
|
|
||||||
theApp.display->setOption( _T("fullScreenStretch"), theApp.fullScreenStretch );
|
theApp.display->setOption( _T("fullScreenStretch"), theApp.fullScreenStretch );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1485,7 +1424,7 @@ void MainWnd::OnOptionsVideoFullscreenmaxscale()
|
||||||
dlg.DoModal();
|
dlg.DoModal();
|
||||||
|
|
||||||
if( theApp.display ) {
|
if( theApp.display ) {
|
||||||
theApp.display->setOption( _T("maxScale"), theApp.fsMaxScale );
|
theApp.display->setOption( _T("maxScale"), theApp.maxScale );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -70,7 +70,7 @@ void MaxScale::OnOk()
|
||||||
{
|
{
|
||||||
CString tmp;
|
CString tmp;
|
||||||
m_value.GetWindowText(tmp);
|
m_value.GetWindowText(tmp);
|
||||||
theApp.fsMaxScale = atoi(tmp);
|
theApp.maxScale = atoi(tmp);
|
||||||
EndDialog(TRUE);
|
EndDialog(TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -80,7 +80,7 @@ BOOL MaxScale::OnInitDialog()
|
||||||
|
|
||||||
CString temp;
|
CString temp;
|
||||||
|
|
||||||
temp.Format("%d", theApp.fsMaxScale);
|
temp.Format("%d", theApp.maxScale);
|
||||||
|
|
||||||
m_value.SetWindowText(temp);
|
m_value.SetWindowText(temp);
|
||||||
|
|
||||||
|
|
|
@ -261,8 +261,8 @@ bool OpenGLDisplay::initialize()
|
||||||
float scaleX = (float)theApp.fsWidth / (float)theApp.sizeX;
|
float scaleX = (float)theApp.fsWidth / (float)theApp.sizeX;
|
||||||
float scaleY = (float)theApp.fsHeight / (float)theApp.sizeY;
|
float scaleY = (float)theApp.fsHeight / (float)theApp.sizeY;
|
||||||
float min = ( scaleX < scaleY ) ? scaleX : scaleY;
|
float min = ( scaleX < scaleY ) ? scaleX : scaleY;
|
||||||
if( theApp.fsMaxScale )
|
if( theApp.maxScale )
|
||||||
min = ( min > (float)theApp.fsMaxScale ) ? (float)theApp.fsMaxScale : min;
|
min = ( min > (float)theApp.maxScale ) ? (float)theApp.maxScale : min;
|
||||||
theApp.surfaceSizeX = (int)((float)theApp.sizeX * min);
|
theApp.surfaceSizeX = (int)((float)theApp.sizeX * min);
|
||||||
theApp.surfaceSizeY = (int)((float)theApp.sizeY * min);
|
theApp.surfaceSizeY = (int)((float)theApp.sizeY * min);
|
||||||
}
|
}
|
||||||
|
@ -310,12 +310,6 @@ bool OpenGLDisplay::initialize()
|
||||||
theApp.updateMenuBar();
|
theApp.updateMenuBar();
|
||||||
|
|
||||||
theApp.adjustDestRect();
|
theApp.adjustDestRect();
|
||||||
theApp.mode320Available = FALSE;
|
|
||||||
theApp.mode640Available = FALSE;
|
|
||||||
theApp.mode800Available = FALSE;
|
|
||||||
theApp.mode1024Available = FALSE;
|
|
||||||
theApp.mode1280Available = FALSE;
|
|
||||||
|
|
||||||
|
|
||||||
currentAdapter = theApp.fsAdapter;
|
currentAdapter = theApp.fsAdapter;
|
||||||
DISPLAY_DEVICE dev;
|
DISPLAY_DEVICE dev;
|
||||||
|
@ -484,7 +478,6 @@ void OpenGLDisplay::render()
|
||||||
void OpenGLDisplay::resize( int w, int h )
|
void OpenGLDisplay::resize( int w, int h )
|
||||||
{
|
{
|
||||||
initializeMatrices( w, h );
|
initializeMatrices( w, h );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//update filtering methods
|
//update filtering methods
|
||||||
|
@ -627,8 +620,8 @@ void OpenGLDisplay::calculateDestRect( int w, int h )
|
||||||
float scaleX = (float)w / (float)width;
|
float scaleX = (float)w / (float)width;
|
||||||
float scaleY = (float)h / (float)height;
|
float scaleY = (float)h / (float)height;
|
||||||
float min = (scaleX < scaleY) ? scaleX : scaleY;
|
float min = (scaleX < scaleY) ? scaleX : scaleY;
|
||||||
if( theApp.fsMaxScale && (min > theApp.fsMaxScale) ) {
|
if( theApp.maxScale && (min > theApp.maxScale) ) {
|
||||||
min = (float)theApp.fsMaxScale;
|
min = (float)theApp.maxScale;
|
||||||
}
|
}
|
||||||
destRect.left = 0;
|
destRect.left = 0;
|
||||||
destRect.top = 0;
|
destRect.top = 0;
|
||||||
|
@ -659,11 +652,11 @@ void OpenGLDisplay::setOption( const char *option, int value )
|
||||||
}
|
}
|
||||||
|
|
||||||
if( !_tcscmp( option, _T("maxScale") ) ) {
|
if( !_tcscmp( option, _T("maxScale") ) ) {
|
||||||
initializeMatrices( theApp.dest.right, theApp.dest.bottom );
|
initializeMatrices( theApp.dest.right-theApp.dest.left, theApp.dest.bottom-theApp.dest.top );
|
||||||
}
|
}
|
||||||
|
|
||||||
if( !_tcscmp( option, _T("fullScreenStretch") ) ) {
|
if( !_tcscmp( option, _T("fullScreenStretch") ) ) {
|
||||||
initializeMatrices( theApp.dest.right, theApp.dest.bottom );
|
initializeMatrices( theApp.dest.right-theApp.dest.left, theApp.dest.bottom-theApp.dest.top );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -213,11 +213,6 @@ VBA::VBA()
|
||||||
}
|
}
|
||||||
|
|
||||||
// ! keep in mind that many of the following values will be really initialized in loadSettings()
|
// ! keep in mind that many of the following values will be really initialized in loadSettings()
|
||||||
mode320Available = false;
|
|
||||||
mode640Available = false;
|
|
||||||
mode800Available = false;
|
|
||||||
mode1024Available = false;
|
|
||||||
mode1280Available = false;
|
|
||||||
maxCpuCores = 1;
|
maxCpuCores = 1;
|
||||||
windowPositionX = 0;
|
windowPositionX = 0;
|
||||||
windowPositionY = 0;
|
windowPositionY = 0;
|
||||||
|
@ -335,7 +330,7 @@ VBA::VBA()
|
||||||
frameskipadjust = 0;
|
frameskipadjust = 0;
|
||||||
autoLoadMostRecent = false;
|
autoLoadMostRecent = false;
|
||||||
winSkipSaveGameBattery = false;
|
winSkipSaveGameBattery = false;
|
||||||
fsMaxScale = 0;
|
maxScale = 0;
|
||||||
romSize = 0;
|
romSize = 0;
|
||||||
lastWindowed = VIDEO_3X;
|
lastWindowed = VIDEO_3X;
|
||||||
lastFullscreen = VIDEO_1024x768;
|
lastFullscreen = VIDEO_1024x768;
|
||||||
|
@ -1750,7 +1745,7 @@ void VBA::loadSettings()
|
||||||
|
|
||||||
cheatsEnabled = regQueryDwordValue("cheatsEnabled", false) ? true : false;
|
cheatsEnabled = regQueryDwordValue("cheatsEnabled", false) ? true : false;
|
||||||
|
|
||||||
fsMaxScale = regQueryDwordValue("fsMaxScale", 0);
|
maxScale = regQueryDwordValue("maxScale", 0);
|
||||||
|
|
||||||
updateThrottle( (unsigned short)regQueryDwordValue( "throttle", 0 ) );
|
updateThrottle( (unsigned short)regQueryDwordValue( "throttle", 0 ) );
|
||||||
|
|
||||||
|
@ -1970,8 +1965,8 @@ void VBA::updateWindowSize(int value)
|
||||||
scaleX = (fsWidth / sizeX);
|
scaleX = (fsWidth / sizeX);
|
||||||
scaleY = (fsHeight / sizeY);
|
scaleY = (fsHeight / sizeY);
|
||||||
int min = scaleX < scaleY ? scaleX : scaleY;
|
int min = scaleX < scaleY ? scaleX : scaleY;
|
||||||
if(fsMaxScale)
|
if(maxScale)
|
||||||
min = min > fsMaxScale ? fsMaxScale : min;
|
min = min > maxScale ? maxScale : min;
|
||||||
surfaceSizeX = min * sizeX;
|
surfaceSizeX = min * sizeX;
|
||||||
surfaceSizeY = min * sizeY;
|
surfaceSizeY = min * sizeY;
|
||||||
if((fullScreenStretch && (display != NULL &&
|
if((fullScreenStretch && (display != NULL &&
|
||||||
|
@ -2661,7 +2656,7 @@ void VBA::saveSettings()
|
||||||
regSetDwordValue("autoLoadMostRecent", autoLoadMostRecent);
|
regSetDwordValue("autoLoadMostRecent", autoLoadMostRecent);
|
||||||
regSetDwordValue("winSkipSaveGameBattery", winSkipSaveGameBattery);
|
regSetDwordValue("winSkipSaveGameBattery", winSkipSaveGameBattery);
|
||||||
regSetDwordValue("cheatsEnabled", cheatsEnabled);
|
regSetDwordValue("cheatsEnabled", cheatsEnabled);
|
||||||
regSetDwordValue("fsMaxScale", fsMaxScale);
|
regSetDwordValue("maxScale", maxScale);
|
||||||
regSetDwordValue("throttle", throttle);
|
regSetDwordValue("throttle", throttle);
|
||||||
regSetStringValue("pluginName", pluginName);
|
regSetStringValue("pluginName", pluginName);
|
||||||
regSetDwordValue("saveMoreCPU", Sm60FPS::bSaveMoreCPU);
|
regSetDwordValue("saveMoreCPU", Sm60FPS::bSaveMoreCPU);
|
||||||
|
|
|
@ -76,11 +76,6 @@ class VBA : public CWinApp
|
||||||
CMenu m_menu;
|
CMenu m_menu;
|
||||||
HMENU menu;
|
HMENU menu;
|
||||||
HMENU popup;
|
HMENU popup;
|
||||||
bool mode320Available;
|
|
||||||
bool mode640Available;
|
|
||||||
bool mode800Available;
|
|
||||||
bool mode1024Available;
|
|
||||||
bool mode1280Available;
|
|
||||||
unsigned int maxCpuCores; // maximum number of CPU cores VBA should use, 0 means auto-detect
|
unsigned int maxCpuCores; // maximum number of CPU cores VBA should use, 0 means auto-detect
|
||||||
int windowPositionX;
|
int windowPositionX;
|
||||||
int windowPositionY;
|
int windowPositionY;
|
||||||
|
@ -203,7 +198,7 @@ class VBA : public CWinApp
|
||||||
int frameskipadjust;
|
int frameskipadjust;
|
||||||
bool autoLoadMostRecent;
|
bool autoLoadMostRecent;
|
||||||
bool winSkipSaveGameBattery;
|
bool winSkipSaveGameBattery;
|
||||||
int fsMaxScale;
|
int maxScale;
|
||||||
int romSize;
|
int romSize;
|
||||||
VIDEO_SIZE lastWindowed;
|
VIDEO_SIZE lastWindowed;
|
||||||
VIDEO_SIZE lastFullscreen;
|
VIDEO_SIZE lastFullscreen;
|
||||||
|
|
|
@ -1687,41 +1687,30 @@ BEGIN
|
||||||
BEGIN
|
BEGIN
|
||||||
POPUP "Render API"
|
POPUP "Render API"
|
||||||
BEGIN
|
BEGIN
|
||||||
MENUITEM "Direct&3D", ID_OPTIONS_VIDEO_RENDERMETHOD_DIRECT3D
|
MENUITEM "Direct3D 9", ID_OPTIONS_VIDEO_RENDERMETHOD_DIRECT3D
|
||||||
MENUITEM " Filter: Nearest", ID_OPTIONS_VIDEO_RENDEROPTIONS_D3DNOFILTER
|
MENUITEM " Filter: Nearest", ID_OPTIONS_VIDEO_RENDEROPTIONS_D3DNOFILTER
|
||||||
MENUITEM " Filter: Bilinear", ID_OPTIONS_VIDEO_RENDEROPTIONS_D3DBILINEAR
|
MENUITEM " Filter: Bilinear", ID_OPTIONS_VIDEO_RENDEROPTIONS_D3DBILINEAR
|
||||||
MENUITEM " Motion Blur", ID_RENDERAPI_D3DMOTIONBLUR
|
MENUITEM " Motion Blur", ID_RENDERAPI_D3DMOTIONBLUR
|
||||||
MENUITEM SEPARATOR
|
MENUITEM SEPARATOR
|
||||||
MENUITEM "&OpenGL", ID_OPTIONS_VIDEO_RENDERMETHOD_OPENGL
|
MENUITEM "OpenGL", ID_OPTIONS_VIDEO_RENDERMETHOD_OPENGL
|
||||||
MENUITEM " Filter: Nearest", ID_OPTIONS_VIDEO_RENDEROPTIONS_GLNEAREST
|
MENUITEM " Filter: Nearest", ID_OPTIONS_VIDEO_RENDEROPTIONS_GLNEAREST
|
||||||
MENUITEM " Filter: Bilinear", ID_OPTIONS_VIDEO_RENDEROPTIONS_GLBILINEAR
|
MENUITEM " Filter: Bilinear", ID_OPTIONS_VIDEO_RENDEROPTIONS_GLBILINEAR
|
||||||
MENUITEM SEPARATOR
|
MENUITEM SEPARATOR
|
||||||
MENUITEM "&VSync", ID_OPTIONS_VIDEO_VSYNC
|
MENUITEM "VSync", ID_OPTIONS_VIDEO_VSYNC
|
||||||
MENUITEM "Triple Buffering", ID_OPTIONS_VIDEO_TRIPLEBUFFERING
|
MENUITEM "Triple Buffering", ID_OPTIONS_VIDEO_TRIPLEBUFFERING
|
||||||
END
|
END
|
||||||
MENUITEM SEPARATOR
|
MENUITEM SEPARATOR
|
||||||
POPUP "Windowed"
|
MENUITEM "1x window size", ID_OPTIONS_VIDEO_X1
|
||||||
BEGIN
|
MENUITEM "2x window size", ID_OPTIONS_VIDEO_X2
|
||||||
MENUITEM "&1x Size", ID_OPTIONS_VIDEO_X1
|
MENUITEM "3x window size", ID_OPTIONS_VIDEO_X3
|
||||||
MENUITEM "&2x Size", ID_OPTIONS_VIDEO_X2
|
MENUITEM "4x window size", ID_OPTIONS_VIDEO_X4
|
||||||
MENUITEM "&3x Size", ID_OPTIONS_VIDEO_X3
|
|
||||||
MENUITEM "&4x Size", ID_OPTIONS_VIDEO_X4
|
|
||||||
END
|
|
||||||
POPUP "Fullscreen"
|
|
||||||
BEGIN
|
|
||||||
MENUITEM "&Custom...", ID_OPTIONS_VIDEO_FULLSCREEN
|
|
||||||
MENUITEM SEPARATOR
|
|
||||||
MENUITEM "320x240x16", ID_OPTIONS_VIDEO_FULLSCREEN320X240
|
|
||||||
MENUITEM "640x480x16", ID_OPTIONS_VIDEO_FULLSCREEN640X480
|
|
||||||
MENUITEM "800x600x16", ID_OPTIONS_VIDEO_FULLSCREEN800X600
|
|
||||||
MENUITEM "1024x768x16", ID_OPTIONS_VIDEO_FULLSCREEN1024X768
|
|
||||||
MENUITEM "1280x1024x16", ID_OPTIONS_VIDEO_FULLSCREEN1280X1024
|
|
||||||
MENUITEM SEPARATOR
|
|
||||||
MENUITEM "&Max Scale...", ID_OPTIONS_VIDEO_FULLSCREENMAXSCALE
|
|
||||||
MENUITEM "Stretch to &fit", ID_OPTIONS_VIDEO_FULLSCREENSTRETCHTOFIT
|
|
||||||
END
|
|
||||||
MENUITEM SEPARATOR
|
MENUITEM SEPARATOR
|
||||||
MENUITEM "D&isable status messages", ID_OPTIONS_EMULATOR_DISABLESTATUSMESSAGES
|
MENUITEM "Select fullscreen mode...", ID_OPTIONS_VIDEO_FULLSCREEN
|
||||||
|
MENUITEM SEPARATOR
|
||||||
|
MENUITEM "Ignore aspect ratio", ID_OPTIONS_VIDEO_FULLSCREENSTRETCHTOFIT
|
||||||
|
MENUITEM "Maximum magnification...", ID_OPTIONS_VIDEO_FULLSCREENMAXSCALE
|
||||||
|
MENUITEM SEPARATOR
|
||||||
|
MENUITEM "Disable status messages", ID_OPTIONS_EMULATOR_DISABLESTATUSMESSAGES
|
||||||
END
|
END
|
||||||
POPUP "&Pixel Filter"
|
POPUP "&Pixel Filter"
|
||||||
BEGIN
|
BEGIN
|
||||||
|
@ -1783,7 +1772,7 @@ BEGIN
|
||||||
MENUITEM "OpenAL", ID_OUTPUTAPI_OPENAL
|
MENUITEM "OpenAL", ID_OUTPUTAPI_OPENAL
|
||||||
MENUITEM " Configuration...", ID_OUTPUTAPI_OALCONFIGURATION
|
MENUITEM " Configuration...", ID_OUTPUTAPI_OALCONFIGURATION
|
||||||
MENUITEM SEPARATOR
|
MENUITEM SEPARATOR
|
||||||
MENUITEM "DirectSound", ID_OUTPUTAPI_DIRECTSOUND
|
MENUITEM "DirectSound 8", ID_OUTPUTAPI_DIRECTSOUND
|
||||||
MENUITEM SEPARATOR
|
MENUITEM SEPARATOR
|
||||||
MENUITEM "&Sync game to audio", ID_OPTIONS_EMULATOR_SYNCHRONIZE
|
MENUITEM "&Sync game to audio", ID_OPTIONS_EMULATOR_SYNCHRONIZE
|
||||||
END
|
END
|
||||||
|
|
Loading…
Reference in New Issue