win32: [ 2607896 ] 1.5x Window Size
This commit is contained in:
parent
c3c3e48da7
commit
3dca16b37a
|
@ -356,6 +356,8 @@ DWORD rotationscanlines = 192*2;
|
|||
|
||||
void ScaleScreen(float factor)
|
||||
{
|
||||
if(factor==65535)
|
||||
factor = 1.5f;
|
||||
if((GPU_rotation == 90) || (GPU_rotation == 270))
|
||||
{
|
||||
MainWindow->setClientSize(((384 + ScreenGap) * factor), (256 * factor));
|
||||
|
@ -1075,6 +1077,7 @@ int MenuInit()
|
|||
MainWindow->checkMenu(ID_VIEW_DISPLAYFPS, FpsDisplay ? MF_CHECKED : MF_UNCHECKED);
|
||||
|
||||
MainWindow->checkMenu(IDC_WINDOW1X, MF_BYCOMMAND | ((windowSize==1)?MF_CHECKED:MF_UNCHECKED));
|
||||
MainWindow->checkMenu(IDC_WINDOW1_5X, MF_BYCOMMAND | ((windowSize==65535)?MF_CHECKED:MF_UNCHECKED));
|
||||
MainWindow->checkMenu(IDC_WINDOW2X, MF_BYCOMMAND | ((windowSize==2)?MF_CHECKED:MF_UNCHECKED));
|
||||
MainWindow->checkMenu(IDC_WINDOW3X, MF_BYCOMMAND | ((windowSize==3)?MF_CHECKED:MF_UNCHECKED));
|
||||
MainWindow->checkMenu(IDC_WINDOW4X, MF_BYCOMMAND | ((windowSize==4)?MF_CHECKED:MF_UNCHECKED));
|
||||
|
@ -2076,6 +2079,15 @@ void RunConfig(CONFIGSCREEN which)
|
|||
NDS_UnPause();
|
||||
}
|
||||
|
||||
static void UncheckViewScalers()
|
||||
{
|
||||
MainWindow->checkMenu(IDC_WINDOW1X, MF_BYCOMMAND | MF_UNCHECKED);
|
||||
MainWindow->checkMenu(IDC_WINDOW1_5X, MF_BYCOMMAND | MF_UNCHECKED);
|
||||
MainWindow->checkMenu(IDC_WINDOW2X, MF_BYCOMMAND | MF_UNCHECKED);
|
||||
MainWindow->checkMenu(IDC_WINDOW3X, MF_BYCOMMAND | MF_UNCHECKED);
|
||||
MainWindow->checkMenu(IDC_WINDOW4X, MF_BYCOMMAND | MF_UNCHECKED);
|
||||
}
|
||||
|
||||
//========================================================================================
|
||||
LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
|
@ -2142,6 +2154,7 @@ LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM
|
|||
{
|
||||
windowSize = 0;
|
||||
MainWindow->checkMenu(IDC_WINDOW1X, MF_BYCOMMAND | MF_UNCHECKED);
|
||||
MainWindow->checkMenu(IDC_WINDOW1_5X, MF_BYCOMMAND | MF_UNCHECKED);
|
||||
MainWindow->checkMenu(IDC_WINDOW2X, MF_BYCOMMAND | MF_UNCHECKED);
|
||||
MainWindow->checkMenu(IDC_WINDOW3X, MF_BYCOMMAND | MF_UNCHECKED);
|
||||
MainWindow->checkMenu(IDC_WINDOW4X, MF_BYCOMMAND | MF_UNCHECKED);
|
||||
|
@ -2825,44 +2838,45 @@ LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM
|
|||
SetRotate(hwnd, 270);
|
||||
return 0;
|
||||
|
||||
case IDC_WINDOW1_5X:
|
||||
windowSize=-1;
|
||||
ScaleScreen(windowSize);
|
||||
WritePrivateProfileInt("Video","Window Size",windowSize,IniName);
|
||||
|
||||
UncheckViewScalers();
|
||||
MainWindow->checkMenu(IDC_WINDOW1_5X, MF_BYCOMMAND | MF_CHECKED);
|
||||
break;
|
||||
|
||||
case IDC_WINDOW1X:
|
||||
windowSize=1;
|
||||
ScaleScreen(windowSize);
|
||||
WritePrivateProfileInt("Video","Window Size",windowSize,IniName);
|
||||
|
||||
UncheckViewScalers();
|
||||
MainWindow->checkMenu(IDC_WINDOW1X, MF_BYCOMMAND | MF_CHECKED);
|
||||
MainWindow->checkMenu(IDC_WINDOW2X, MF_BYCOMMAND | MF_UNCHECKED);
|
||||
MainWindow->checkMenu(IDC_WINDOW3X, MF_BYCOMMAND | MF_UNCHECKED);
|
||||
MainWindow->checkMenu(IDC_WINDOW4X, MF_BYCOMMAND | MF_UNCHECKED);
|
||||
break;
|
||||
case IDC_WINDOW2X:
|
||||
windowSize=2;
|
||||
ScaleScreen(windowSize);
|
||||
WritePrivateProfileInt("Video","Window Size",windowSize,IniName);
|
||||
|
||||
MainWindow->checkMenu(IDC_WINDOW1X, MF_BYCOMMAND | MF_UNCHECKED);
|
||||
UncheckViewScalers();
|
||||
MainWindow->checkMenu(IDC_WINDOW2X, MF_BYCOMMAND | MF_CHECKED);
|
||||
MainWindow->checkMenu(IDC_WINDOW3X, MF_BYCOMMAND | MF_UNCHECKED);
|
||||
MainWindow->checkMenu(IDC_WINDOW4X, MF_BYCOMMAND | MF_UNCHECKED);
|
||||
break;
|
||||
case IDC_WINDOW3X:
|
||||
windowSize=3;
|
||||
ScaleScreen(windowSize);
|
||||
WritePrivateProfileInt("Video","Window Size",windowSize,IniName);
|
||||
|
||||
MainWindow->checkMenu(IDC_WINDOW1X, MF_BYCOMMAND | MF_UNCHECKED);
|
||||
MainWindow->checkMenu(IDC_WINDOW2X, MF_BYCOMMAND | MF_UNCHECKED);
|
||||
UncheckViewScalers();
|
||||
MainWindow->checkMenu(IDC_WINDOW3X, MF_BYCOMMAND | MF_CHECKED);
|
||||
MainWindow->checkMenu(IDC_WINDOW4X, MF_BYCOMMAND | MF_UNCHECKED);
|
||||
break;
|
||||
case IDC_WINDOW4X:
|
||||
windowSize=4;
|
||||
ScaleScreen(windowSize);
|
||||
WritePrivateProfileInt("Video","Window Size",windowSize,IniName);
|
||||
|
||||
MainWindow->checkMenu(IDC_WINDOW1X, MF_BYCOMMAND | MF_UNCHECKED);
|
||||
MainWindow->checkMenu(IDC_WINDOW2X, MF_BYCOMMAND | MF_UNCHECKED);
|
||||
MainWindow->checkMenu(IDC_WINDOW3X, MF_BYCOMMAND | MF_UNCHECKED);
|
||||
UncheckViewScalers();
|
||||
MainWindow->checkMenu(IDC_WINDOW4X, MF_BYCOMMAND | MF_CHECKED);
|
||||
break;
|
||||
|
||||
|
|
|
@ -390,6 +390,7 @@
|
|||
#define IDM_ABOUT 40003
|
||||
#define IDM_EMULATIONSETTINGS 40004
|
||||
#define IDC_FRAMELIMIT 40005
|
||||
#define IDC_WINDOW1_5X 40006
|
||||
#define ID_VIEW_FRAMECOUNTER 40009
|
||||
#define ID_VIEW_DISPLAYFPS 40010
|
||||
#define IDM_FILE_RECORDAVI 40015
|
||||
|
|
|
@ -97,6 +97,7 @@ BEGIN
|
|||
POPUP "Vindue &Størrelse"
|
||||
BEGIN
|
||||
MENUITEM "1x", IDC_WINDOW1X
|
||||
MENUITEM "1.5x", IDC_WINDOW1_5X
|
||||
MENUITEM "2x", IDC_WINDOW2X
|
||||
MENUITEM "3x", IDC_WINDOW3X
|
||||
MENUITEM "4x", IDC_WINDOW4X
|
||||
|
@ -259,6 +260,7 @@ BEGIN
|
|||
POPUP "Window &Size"
|
||||
BEGIN
|
||||
MENUITEM "1x", IDC_WINDOW1X
|
||||
MENUITEM "1.5x", IDC_WINDOW1_5X
|
||||
MENUITEM "2x", IDC_WINDOW2X
|
||||
MENUITEM "3x", IDC_WINDOW3X
|
||||
MENUITEM "4x", IDC_WINDOW4X
|
||||
|
@ -423,6 +425,7 @@ BEGIN
|
|||
POPUP "Taille de la fenêtre"
|
||||
BEGIN
|
||||
MENUITEM "1x", IDC_WINDOW1X
|
||||
MENUITEM "1.5x", IDC_WINDOW1_5X
|
||||
MENUITEM "2x", IDC_WINDOW2X
|
||||
MENUITEM "3x", IDC_WINDOW3X
|
||||
MENUITEM "4x", IDC_WINDOW4X
|
||||
|
|
Loading…
Reference in New Issue