win32: customizable gap color (white/gray/black)
This commit is contained in:
parent
bec8aa50de
commit
4b50a9ec03
|
@ -249,6 +249,7 @@ void SetRotate(HWND hwnd, int rot);
|
||||||
|
|
||||||
bool ForceRatio = true;
|
bool ForceRatio = true;
|
||||||
bool SeparationBorderDrag = true;
|
bool SeparationBorderDrag = true;
|
||||||
|
int ScreenGapColor = 0xFFFFFF;
|
||||||
float DefaultWidth;
|
float DefaultWidth;
|
||||||
float DefaultHeight;
|
float DefaultHeight;
|
||||||
float widthTradeOff;
|
float widthTradeOff;
|
||||||
|
@ -883,7 +884,7 @@ static void DD_DoDisplay()
|
||||||
{
|
{
|
||||||
//u32 color = gapColors[win_fw_config.fav_colour];
|
//u32 color = gapColors[win_fw_config.fav_colour];
|
||||||
//u32 color_rev = (((color & 0xFF) << 16) | (color & 0xFF00) | ((color & 0xFF0000) >> 16));
|
//u32 color_rev = (((color & 0xFF) << 16) | (color & 0xFF00) | ((color & 0xFF0000) >> 16));
|
||||||
u32 color_rev = 0xFFFFFF;
|
u32 color_rev = (u32)ScreenGapColor;
|
||||||
|
|
||||||
HDC dc;
|
HDC dc;
|
||||||
HBRUSH brush;
|
HBRUSH brush;
|
||||||
|
@ -1849,6 +1850,7 @@ int _main()
|
||||||
|
|
||||||
video.screengap = GetPrivateProfileInt("Display", "ScreenGap", 0, IniName);
|
video.screengap = GetPrivateProfileInt("Display", "ScreenGap", 0, IniName);
|
||||||
SeparationBorderDrag = GetPrivateProfileBool("Display", "Window Split Border Drag", true, IniName);
|
SeparationBorderDrag = GetPrivateProfileBool("Display", "Window Split Border Drag", true, IniName);
|
||||||
|
ScreenGapColor = GetPrivateProfileInt("Display", "ScreenGapColor", 0xFFFFFF, IniName);
|
||||||
FrameLimit = GetPrivateProfileBool("FrameLimit", "FrameLimit", true, IniName);
|
FrameLimit = GetPrivateProfileBool("FrameLimit", "FrameLimit", true, IniName);
|
||||||
CommonSettings.showGpu.main = GetPrivateProfileInt("Display", "MainGpu", 1, IniName) != 0;
|
CommonSettings.showGpu.main = GetPrivateProfileInt("Display", "MainGpu", 1, IniName) != 0;
|
||||||
CommonSettings.showGpu.sub = GetPrivateProfileInt("Display", "SubGpu", 1, IniName) != 0;
|
CommonSettings.showGpu.sub = GetPrivateProfileInt("Display", "SubGpu", 1, IniName) != 0;
|
||||||
|
@ -2971,6 +2973,9 @@ LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM
|
||||||
MainWindow->checkMenu(IDM_SCREENSEP_NDSGAP, ((video.screengap==kGapNDS)));
|
MainWindow->checkMenu(IDM_SCREENSEP_NDSGAP, ((video.screengap==kGapNDS)));
|
||||||
MainWindow->checkMenu(IDM_SCREENSEP_NDSGAP2, ((video.screengap==kGapNDS2)));
|
MainWindow->checkMenu(IDM_SCREENSEP_NDSGAP2, ((video.screengap==kGapNDS2)));
|
||||||
MainWindow->checkMenu(IDM_SCREENSEP_DRAGEDIT, (SeparationBorderDrag));
|
MainWindow->checkMenu(IDM_SCREENSEP_DRAGEDIT, (SeparationBorderDrag));
|
||||||
|
MainWindow->checkMenu(IDM_SCREENSEP_COLORWHITE, ((ScreenGapColor&0xFFFFFF) == 0xFFFFFF));
|
||||||
|
MainWindow->checkMenu(IDM_SCREENSEP_COLORGRAY, ((ScreenGapColor&0xFFFFFF) == 0x7F7F7F));
|
||||||
|
MainWindow->checkMenu(IDM_SCREENSEP_COLORBLACK, ((ScreenGapColor&0xFFFFFF) == 0x000000));
|
||||||
|
|
||||||
//Counters / Etc.
|
//Counters / Etc.
|
||||||
MainWindow->checkMenu(ID_VIEW_FRAMECOUNTER,CommonSettings.hud.FrameCounterDisplay);
|
MainWindow->checkMenu(ID_VIEW_FRAMECOUNTER,CommonSettings.hud.FrameCounterDisplay);
|
||||||
|
@ -3062,6 +3067,7 @@ LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM
|
||||||
|
|
||||||
//Save frame counter status
|
//Save frame counter status
|
||||||
WritePrivateProfileInt("Display", "FrameCounter", CommonSettings.hud.FrameCounterDisplay, IniName);
|
WritePrivateProfileInt("Display", "FrameCounter", CommonSettings.hud.FrameCounterDisplay, IniName);
|
||||||
|
|
||||||
WritePrivateProfileInt("Display", "ScreenGap", video.screengap, IniName);
|
WritePrivateProfileInt("Display", "ScreenGap", video.screengap, IniName);
|
||||||
|
|
||||||
//Save Ram Watch information
|
//Save Ram Watch information
|
||||||
|
@ -4049,6 +4055,17 @@ LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM
|
||||||
SeparationBorderDrag = !SeparationBorderDrag;
|
SeparationBorderDrag = !SeparationBorderDrag;
|
||||||
WritePrivateProfileInt("Display","Window Split Border Drag",(int)SeparationBorderDrag,IniName);
|
WritePrivateProfileInt("Display","Window Split Border Drag",(int)SeparationBorderDrag,IniName);
|
||||||
break;
|
break;
|
||||||
|
case IDM_SCREENSEP_COLORWHITE:
|
||||||
|
case IDM_SCREENSEP_COLORGRAY:
|
||||||
|
case IDM_SCREENSEP_COLORBLACK:
|
||||||
|
switch(LOWORD(wParam))
|
||||||
|
{
|
||||||
|
case IDM_SCREENSEP_COLORWHITE: ScreenGapColor = 0xFFFFFF; break;
|
||||||
|
case IDM_SCREENSEP_COLORGRAY: ScreenGapColor = 0x7F7F7F; break;
|
||||||
|
case IDM_SCREENSEP_COLORBLACK: ScreenGapColor = 0x000000; break;
|
||||||
|
}
|
||||||
|
WritePrivateProfileInt("Display", "ScreenGapColor", ScreenGapColor, IniName);
|
||||||
|
break;
|
||||||
case IDM_WEBSITE:
|
case IDM_WEBSITE:
|
||||||
ShellExecute(NULL, "open", "http://desmume.sourceforge.net", NULL, NULL, SW_SHOWNORMAL);
|
ShellExecute(NULL, "open", "http://desmume.sourceforge.net", NULL, NULL, SW_SHOWNORMAL);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -707,6 +707,9 @@
|
||||||
#define IDC_LANG_CHINESE_SIMPLIFIED 40020
|
#define IDC_LANG_CHINESE_SIMPLIFIED 40020
|
||||||
#define IDM_SCREENSEP_NDSGAP2 40021
|
#define IDM_SCREENSEP_NDSGAP2 40021
|
||||||
#define IDM_SCREENSEP_DRAGEDIT 40022
|
#define IDM_SCREENSEP_DRAGEDIT 40022
|
||||||
|
#define IDM_SCREENSEP_COLORWHITE 40023
|
||||||
|
#define IDM_SCREENSEP_COLORGRAY 40024
|
||||||
|
#define IDM_SCREENSEP_COLORBLACK 40025
|
||||||
#define ID_FILE_RECENTROM 40034
|
#define ID_FILE_RECENTROM 40034
|
||||||
#define IDC_SAVETYPE7 40037
|
#define IDC_SAVETYPE7 40037
|
||||||
#define IDM_DEFSIZE 40038
|
#define IDM_DEFSIZE 40038
|
||||||
|
|
Binary file not shown.
Loading…
Reference in New Issue