mirror of
https://github.com/snes9xgit/snes9x.git
synced 2025-04-02 10:42:16 -04:00
Compare commits
4 commits
be53955553
...
d62f14212e
Author | SHA1 | Date | |
---|---|---|---|
|
d62f14212e | ||
|
87f050feba | ||
|
bf83f0f605 | ||
|
ba6f67510e |
9 changed files with 138 additions and 45 deletions
|
@ -139,7 +139,7 @@ bool COpenGL::Initialize(HWND hWnd)
|
||||||
{
|
{
|
||||||
auto defaults = S9xImGuiGetDefaults();
|
auto defaults = S9xImGuiGetDefaults();
|
||||||
defaults.font_size = GUI.OSDSize;
|
defaults.font_size = GUI.OSDSize;
|
||||||
defaults.spacing = defaults.font_size / 2.4;
|
defaults.spacing = static_cast<int>(defaults.font_size / 2.4);
|
||||||
S9xImGuiInit(&defaults);
|
S9xImGuiInit(&defaults);
|
||||||
ImGui_ImplOpenGL3_Init();
|
ImGui_ImplOpenGL3_Init();
|
||||||
Settings.DisplayIndicators = true;
|
Settings.DisplayIndicators = true;
|
||||||
|
|
|
@ -445,7 +445,7 @@ bool IsReserved (WORD Key, int modifiers)
|
||||||
|| modifiers == CUSTKEY_ALT_MASK
|
|| modifiers == CUSTKEY_ALT_MASK
|
||||||
&& (Key == VK_F5 || Key == VK_F7 || Key == VK_F8 || Key == VK_F9
|
&& (Key == VK_F5 || Key == VK_F7 || Key == VK_F8 || Key == VK_F9
|
||||||
|| Key == 'R' || Key == 'T' || Key == /*VK_OEM_4*/0xDB || Key == /*VK_OEM_6*/0xDD
|
|| Key == 'R' || Key == 'T' || Key == /*VK_OEM_4*/0xDB || Key == /*VK_OEM_6*/0xDD
|
||||||
|| Key == 'E' || Key == 'A' || Key == VK_RETURN || Key == VK_DELETE))
|
|| Key == 'E' || Key == VK_RETURN || Key == VK_DELETE))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -508,7 +508,6 @@
|
||||||
#define ID_CHANNELS_CHANNEL7 40145
|
#define ID_CHANNELS_CHANNEL7 40145
|
||||||
#define ID_CHANNELS_CHANNEL8 40146
|
#define ID_CHANNELS_CHANNEL8 40146
|
||||||
#define ID_CHANNELS_ENABLEALL 40147
|
#define ID_CHANNELS_ENABLEALL 40147
|
||||||
#define ID_CHEAT_SEARCH_MODAL 40148
|
|
||||||
#define ID_SAVESCREENSHOT 40151
|
#define ID_SAVESCREENSHOT 40151
|
||||||
#define ID_FILE_LOAD_GAME 40152
|
#define ID_FILE_LOAD_GAME 40152
|
||||||
#define ID_FILE_LOADMULTICART 40153
|
#define ID_FILE_LOADMULTICART 40153
|
||||||
|
|
|
@ -237,7 +237,7 @@ BEGIN
|
||||||
END
|
END
|
||||||
|
|
||||||
IDD_CHEATER DIALOGEX 0, 0, 378, 189
|
IDD_CHEATER DIALOGEX 0, 0, 378, 189
|
||||||
STYLE DS_SETFONT | DS_SETFOREGROUND | DS_3DLOOK | DS_FIXEDSYS | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_VISIBLE | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME
|
STYLE DS_SETFONT | DS_MODALFRAME | DS_SETFOREGROUND | DS_3DLOOK | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU
|
||||||
CAPTION "Cheat Entry and Editor"
|
CAPTION "Cheat Entry and Editor"
|
||||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||||
BEGIN
|
BEGIN
|
||||||
|
@ -802,8 +802,6 @@ IDC_CURSOR_SCOPE CURSOR "nodrop.cur"
|
||||||
|
|
||||||
IDR_SNES9X_ACCELERATORS ACCELERATORS
|
IDR_SNES9X_ACCELERATORS ACCELERATORS
|
||||||
BEGIN
|
BEGIN
|
||||||
"G", ID_CHEAT_ENTER, VIRTKEY, ALT, NOINVERT
|
|
||||||
"A", ID_CHEAT_SEARCH, VIRTKEY, ALT, NOINVERT
|
|
||||||
"O", ID_FILE_LOAD_GAME, VIRTKEY, CONTROL, NOINVERT
|
"O", ID_FILE_LOAD_GAME, VIRTKEY, CONTROL, NOINVERT
|
||||||
VK_F5, ID_OPTIONS_DISPLAY, VIRTKEY, ALT, NOINVERT
|
VK_F5, ID_OPTIONS_DISPLAY, VIRTKEY, ALT, NOINVERT
|
||||||
VK_F7, ID_OPTIONS_JOYPAD, VIRTKEY, ALT, NOINVERT
|
VK_F7, ID_OPTIONS_JOYPAD, VIRTKEY, ALT, NOINVERT
|
||||||
|
@ -1081,9 +1079,8 @@ BEGIN
|
||||||
END
|
END
|
||||||
POPUP "&Cheat", 0,MFT_STRING,MFS_ENABLED
|
POPUP "&Cheat", 0,MFT_STRING,MFS_ENABLED
|
||||||
BEGIN
|
BEGIN
|
||||||
MENUITEM "&Game Genie, Pro-Action Replay Codes\tAlt+G", ID_CHEAT_ENTER,MFT_STRING,MFS_ENABLED
|
MENUITEM "&Game Genie, Pro-Action Replay Codes", ID_CHEAT_ENTER,MFT_STRING,MFS_ENABLED
|
||||||
MENUITEM "&Search for New Cheats", ID_CHEAT_SEARCH_MODAL,MFT_STRING,MFS_ENABLED
|
MENUITEM "&Search for New Cheats", ID_CHEAT_SEARCH,MFT_STRING,MFS_ENABLED
|
||||||
MENUITEM "Search for New Cheats (active)\tAlt+A", 40064,MFT_STRING,MFS_ENABLED
|
|
||||||
MENUITEM "&Apply Cheats", ID_CHEAT_APPLY,MFT_STRING,MFS_CHECKED
|
MENUITEM "&Apply Cheats", ID_CHEAT_APPLY,MFT_STRING,MFS_CHECKED
|
||||||
END
|
END
|
||||||
POPUP "&Netplay", 0,MFT_STRING,MFS_ENABLED
|
POPUP "&Netplay", 0,MFT_STRING,MFS_ENABLED
|
||||||
|
|
|
@ -939,6 +939,9 @@ void WinRegisterConfigItems()
|
||||||
ADD(SaveFileSelect); ADD(LoadFileSelect);
|
ADD(SaveFileSelect); ADD(LoadFileSelect);
|
||||||
ADD(Mute);
|
ADD(Mute);
|
||||||
ADD(ToggleBackdrop);
|
ADD(ToggleBackdrop);
|
||||||
|
ADD(AspectRatio);
|
||||||
|
ADD(CheatEditorDialog);
|
||||||
|
ADD(CheatSearchDialog);
|
||||||
#undef ADD
|
#undef ADD
|
||||||
#undef ADDN
|
#undef ADDN
|
||||||
#undef CATEGORY
|
#undef CATEGORY
|
||||||
|
|
|
@ -48,7 +48,6 @@ static int avi_image_size = 0;
|
||||||
static uint32 avi_skip_frames = 0;
|
static uint32 avi_skip_frames = 0;
|
||||||
static bool pre_avi_soundsync = true;
|
static bool pre_avi_soundsync = true;
|
||||||
static uint32 pre_avi_soundinputrate = 32000;
|
static uint32 pre_avi_soundinputrate = 32000;
|
||||||
void DoAVIOpen(const char* filename);
|
|
||||||
void DoAVIClose(int reason);
|
void DoAVIClose(int reason);
|
||||||
|
|
||||||
void S9xWinScanJoypads ();
|
void S9xWinScanJoypads ();
|
||||||
|
|
|
@ -136,6 +136,10 @@ Nintendo is a trademark.")
|
||||||
#define HOTKEYS_LABEL_4_11 TEXT("Save to file:")
|
#define HOTKEYS_LABEL_4_11 TEXT("Save to file:")
|
||||||
#define HOTKEYS_LABEL_4_12 TEXT("Load from file:")
|
#define HOTKEYS_LABEL_4_12 TEXT("Load from file:")
|
||||||
|
|
||||||
|
#define HOTKEYS_SWITCH_ASPECT_RATIO TEXT("Switch aspect Ratio:")
|
||||||
|
#define HOTKEYS_CHEAT_EDITOR_DIALOG TEXT("Cheats Editor Dialog:")
|
||||||
|
#define HOTKEYS_CHEAT_SEARCH_DIALOG TEXT("Cheats Search Dialog:")
|
||||||
|
|
||||||
// gaming buttons and axes
|
// gaming buttons and axes
|
||||||
#define GAMEDEVICE_JOYNUMPREFIX "(J%x)" // don't change this
|
#define GAMEDEVICE_JOYNUMPREFIX "(J%x)" // don't change this
|
||||||
#define GAMEDEVICE_JOYBUTPREFIX "#[%d]" // don't change this
|
#define GAMEDEVICE_JOYBUTPREFIX "#[%d]" // don't change this
|
||||||
|
|
|
@ -108,6 +108,8 @@ INT_PTR CALLBACK DlgCreateMovie(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lPara
|
||||||
INT_PTR CALLBACK DlgOpenMovie(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam);
|
INT_PTR CALLBACK DlgOpenMovie(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam);
|
||||||
HRESULT CALLBACK EnumModesCallback( LPDDSURFACEDESC lpDDSurfaceDesc, LPVOID lpContext);
|
HRESULT CALLBACK EnumModesCallback( LPDDSURFACEDESC lpDDSurfaceDesc, LPVOID lpContext);
|
||||||
int WinSearchCheatDatabase();
|
int WinSearchCheatDatabase();
|
||||||
|
void WinShowCheatEditorDialog();
|
||||||
|
void WinShowCheatSearchDialog();
|
||||||
|
|
||||||
VOID CALLBACK HotkeyTimer( UINT idEvent, UINT uMsg, DWORD dwUser, DWORD dw1, DWORD dw2);
|
VOID CALLBACK HotkeyTimer( UINT idEvent, UINT uMsg, DWORD dwUser, DWORD dw1, DWORD dw2);
|
||||||
|
|
||||||
|
@ -125,7 +127,8 @@ void S9xWinScanJoypads();
|
||||||
#define TIMER_SCANJOYPADS (99999)
|
#define TIMER_SCANJOYPADS (99999)
|
||||||
#define NC_SEARCHDB 0x8000
|
#define NC_SEARCHDB 0x8000
|
||||||
|
|
||||||
#define MAX_SWITCHABLE_HOTKEY_DIALOG_ITEMS 14
|
constexpr int MAX_SWITCHABLE_HOTKEY_DIALOG_ITEMS = 14;
|
||||||
|
constexpr int MAX_SWITCHABLE_HOTKEY_DIALOG_PAGES = 5;
|
||||||
|
|
||||||
#ifdef UNICODE
|
#ifdef UNICODE
|
||||||
#define S9XW_SHARD_PATH SHARD_PATHW
|
#define S9XW_SHARD_PATH SHARD_PATHW
|
||||||
|
@ -407,11 +410,16 @@ struct SCustomKeys CustomKeys = {
|
||||||
{0,0}}, // Select save slot 9
|
{0,0}}, // Select save slot 9
|
||||||
{'R',CUSTKEY_CTRL_MASK|CUSTKEY_ALT_MASK}, // Reset Game
|
{'R',CUSTKEY_CTRL_MASK|CUSTKEY_ALT_MASK}, // Reset Game
|
||||||
{0,0}, // Toggle Cheats
|
{0,0}, // Toggle Cheats
|
||||||
{0,0},
|
{0,0}, // Quit
|
||||||
{'R',0}, // Rewind
|
{'R',0}, // Rewind
|
||||||
|
{0,0}, // Save File Select
|
||||||
|
{0,0}, // Load File Select
|
||||||
|
{0,0}, // Mute
|
||||||
|
{0,0}, // Aspect ratio
|
||||||
|
{'G', CUSTKEY_ALT_MASK}, // Cheat Editor Dialog
|
||||||
|
{'A', CUSTKEY_ALT_MASK}, // Cheat Search Dialog
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
struct SSoundRates
|
struct SSoundRates
|
||||||
{
|
{
|
||||||
uint32 rate;
|
uint32 rate;
|
||||||
|
@ -1234,8 +1242,55 @@ int HandleKeyMessage(WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
auto cmd = S9xGetCommandT("ToggleBackdrop");
|
auto cmd = S9xGetCommandT("ToggleBackdrop");
|
||||||
S9xApplyCommand(cmd, 1, 0);
|
S9xApplyCommand(cmd, 1, 0);
|
||||||
|
hitHotKey = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (wParam == CustomKeys.AspectRatio.key
|
||||||
|
&& modifiers == CustomKeys.AspectRatio.modifiers)
|
||||||
|
{
|
||||||
|
if (GUI.AspectWidth == ASPECT_WIDTH_4_3)
|
||||||
|
{
|
||||||
|
GUI.AspectWidth = ASPECT_WIDTH_8_7;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
GUI.AspectWidth = ASPECT_WIDTH_4_3;
|
||||||
|
}
|
||||||
|
hitHotKey = true;
|
||||||
|
}
|
||||||
|
if (wParam == CustomKeys.CheatEditorDialog.key
|
||||||
|
&& modifiers == CustomKeys.CheatEditorDialog.modifiers)
|
||||||
|
{
|
||||||
|
// update menu state
|
||||||
|
CheckMenuStates();
|
||||||
|
// check menu state if item is enabled
|
||||||
|
MENUITEMINFO mii = { 0 };
|
||||||
|
mii.cbSize = sizeof(mii);
|
||||||
|
mii.fMask = MIIM_STATE;
|
||||||
|
GetMenuItemInfo(GUI.hMenu, ID_CHEAT_ENTER, FALSE, &mii);
|
||||||
|
if ((mii.fState & MFS_DISABLED) != MFS_DISABLED)
|
||||||
|
{
|
||||||
|
WinShowCheatEditorDialog();
|
||||||
|
}
|
||||||
|
hitHotKey = true;
|
||||||
|
}
|
||||||
|
if (wParam == CustomKeys.CheatSearchDialog.key
|
||||||
|
&& modifiers == CustomKeys.CheatSearchDialog.modifiers)
|
||||||
|
{
|
||||||
|
// update menu state
|
||||||
|
CheckMenuStates();
|
||||||
|
// check menu state if item is enabled
|
||||||
|
MENUITEMINFO mii = { 0 };
|
||||||
|
mii.cbSize = sizeof(mii);
|
||||||
|
mii.fMask = MIIM_STATE;
|
||||||
|
GetMenuItemInfo(GUI.hMenu, ID_CHEAT_SEARCH, FALSE, &mii);
|
||||||
|
if((mii.fState & MFS_DISABLED) != MFS_DISABLED)
|
||||||
|
{
|
||||||
|
WinShowCheatSearchDialog();
|
||||||
|
}
|
||||||
|
hitHotKey = true;
|
||||||
|
}
|
||||||
|
|
||||||
//if(wParam == CustomKeys.BGLHack.key
|
//if(wParam == CustomKeys.BGLHack.key
|
||||||
//&& modifiers == CustomKeys.BGLHack.modifiers)
|
//&& modifiers == CustomKeys.BGLHack.modifiers)
|
||||||
//{
|
//{
|
||||||
|
@ -1499,6 +1554,32 @@ static bool startingMovie = false;
|
||||||
|
|
||||||
HWND cheatSearchHWND = NULL;
|
HWND cheatSearchHWND = NULL;
|
||||||
|
|
||||||
|
void WinShowCheatSearchDialog()
|
||||||
|
{
|
||||||
|
RestoreGUIDisplay();
|
||||||
|
if (!cheatSearchHWND) // create and show non-modal cheat search window
|
||||||
|
{
|
||||||
|
cheatSearchHWND = CreateDialog(g_hInst, MAKEINTRESOURCE(IDD_CHEAT_SEARCH), GUI.hWnd, DlgCheatSearch); // non-modal/modeless
|
||||||
|
ShowWindow(cheatSearchHWND, SW_SHOW);
|
||||||
|
}
|
||||||
|
else // already open so just reactivate the window
|
||||||
|
{
|
||||||
|
SetActiveWindow(cheatSearchHWND);
|
||||||
|
}
|
||||||
|
RestoreSNESDisplay();
|
||||||
|
}
|
||||||
|
|
||||||
|
void WinShowCheatEditorDialog()
|
||||||
|
{
|
||||||
|
RestoreGUIDisplay();
|
||||||
|
while (DialogBox(g_hInst, MAKEINTRESOURCE(IDD_CHEATER), GUI.hWnd, DlgCheater) == NC_SEARCHDB)
|
||||||
|
{
|
||||||
|
WinSearchCheatDatabase();
|
||||||
|
}
|
||||||
|
S9xSaveCheatFile(S9xGetFilename(".cht", CHEAT_DIR));
|
||||||
|
RestoreSNESDisplay();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
#define MOVIE_LOCKED_SETTING if(S9xMovieActive()) {MessageBox(GUI.hWnd,TEXT("That setting is locked while a movie is active."),TEXT("Notice"),MB_OK|MB_ICONEXCLAMATION); break;}
|
#define MOVIE_LOCKED_SETTING if(S9xMovieActive()) {MessageBox(GUI.hWnd,TEXT("That setting is locked while a movie is active."),TEXT("Notice"),MB_OK|MB_ICONEXCLAMATION); break;}
|
||||||
|
|
||||||
|
@ -2211,32 +2292,10 @@ LRESULT CALLBACK WinProc(
|
||||||
FreezeUnfreezeDialogPreview(TRUE);
|
FreezeUnfreezeDialogPreview(TRUE);
|
||||||
break;
|
break;
|
||||||
case ID_CHEAT_ENTER:
|
case ID_CHEAT_ENTER:
|
||||||
RestoreGUIDisplay ();
|
WinShowCheatEditorDialog();
|
||||||
while (DialogBox(g_hInst, MAKEINTRESOURCE(IDD_CHEATER), hWnd, DlgCheater) == NC_SEARCHDB)
|
|
||||||
{
|
|
||||||
WinSearchCheatDatabase();
|
|
||||||
}
|
|
||||||
S9xSaveCheatFile (S9xGetFilename (".cht", CHEAT_DIR));
|
|
||||||
RestoreSNESDisplay ();
|
|
||||||
break;
|
break;
|
||||||
case ID_CHEAT_SEARCH:
|
case ID_CHEAT_SEARCH:
|
||||||
RestoreGUIDisplay ();
|
WinShowCheatSearchDialog();
|
||||||
if(!cheatSearchHWND) // create and show non-modal cheat search window
|
|
||||||
{
|
|
||||||
cheatSearchHWND = CreateDialog(g_hInst, MAKEINTRESOURCE(IDD_CHEAT_SEARCH), hWnd, DlgCheatSearch); // non-modal/modeless
|
|
||||||
ShowWindow(cheatSearchHWND, SW_SHOW);
|
|
||||||
}
|
|
||||||
else // already open so just reactivate the window
|
|
||||||
{
|
|
||||||
SetActiveWindow(cheatSearchHWND);
|
|
||||||
}
|
|
||||||
RestoreSNESDisplay ();
|
|
||||||
break;
|
|
||||||
case ID_CHEAT_SEARCH_MODAL:
|
|
||||||
RestoreGUIDisplay ();
|
|
||||||
DialogBox(g_hInst, MAKEINTRESOURCE(IDD_CHEAT_SEARCH), hWnd, DlgCheatSearch); // modal
|
|
||||||
S9xSaveCheatFile (S9xGetFilename (".cht", CHEAT_DIR));
|
|
||||||
RestoreSNESDisplay ();
|
|
||||||
break;
|
break;
|
||||||
case ID_CHEAT_APPLY:
|
case ID_CHEAT_APPLY:
|
||||||
Settings.ApplyCheats = !Settings.ApplyCheats;
|
Settings.ApplyCheats = !Settings.ApplyCheats;
|
||||||
|
@ -3716,7 +3775,6 @@ static void CheckMenuStates ()
|
||||||
|
|
||||||
SetMenuItemInfo (GUI.hMenu, ID_FILE_RESET, FALSE, &mii);
|
SetMenuItemInfo (GUI.hMenu, ID_FILE_RESET, FALSE, &mii);
|
||||||
SetMenuItemInfo (GUI.hMenu, ID_CHEAT_ENTER, FALSE, &mii);
|
SetMenuItemInfo (GUI.hMenu, ID_CHEAT_ENTER, FALSE, &mii);
|
||||||
SetMenuItemInfo (GUI.hMenu, ID_CHEAT_SEARCH_MODAL, FALSE, &mii);
|
|
||||||
SetMenuItemInfo (GUI.hMenu, IDM_ROM_INFO, FALSE, &mii);
|
SetMenuItemInfo (GUI.hMenu, IDM_ROM_INFO, FALSE, &mii);
|
||||||
|
|
||||||
if (GUI.FullScreen)
|
if (GUI.FullScreen)
|
||||||
|
@ -7562,10 +7620,10 @@ INT_PTR CALLBACK DlgFunky(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam)
|
||||||
SendDlgItemMessage(hDlg, IDC_ASPECTDROP, CB_ADDSTRING, 0, (LPARAM)TEXT("8:7"));
|
SendDlgItemMessage(hDlg, IDC_ASPECTDROP, CB_ADDSTRING, 0, (LPARAM)TEXT("8:7"));
|
||||||
SendDlgItemMessage(hDlg, IDC_ASPECTDROP, CB_ADDSTRING, 0, (LPARAM)TEXT("4:3"));
|
SendDlgItemMessage(hDlg, IDC_ASPECTDROP, CB_ADDSTRING, 0, (LPARAM)TEXT("4:3"));
|
||||||
switch (GUI.AspectWidth) {
|
switch (GUI.AspectWidth) {
|
||||||
case 256:
|
case ASPECT_WIDTH_4_3:
|
||||||
SendDlgItemMessage(hDlg, IDC_ASPECTDROP, CB_SETCURSEL, (WPARAM)0, 0);
|
SendDlgItemMessage(hDlg, IDC_ASPECTDROP, CB_SETCURSEL, (WPARAM)0, 0);
|
||||||
break;
|
break;
|
||||||
case 299:
|
case ASPECT_WIDTH_8_7:
|
||||||
SendDlgItemMessage(hDlg, IDC_ASPECTDROP, CB_SETCURSEL, (WPARAM)1, 0);
|
SendDlgItemMessage(hDlg, IDC_ASPECTDROP, CB_SETCURSEL, (WPARAM)1, 0);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -7731,10 +7789,10 @@ INT_PTR CALLBACK DlgFunky(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam)
|
||||||
int newsel = SendDlgItemMessage(hDlg,IDC_ASPECTDROP,CB_GETCURSEL,0,0);
|
int newsel = SendDlgItemMessage(hDlg,IDC_ASPECTDROP,CB_GETCURSEL,0,0);
|
||||||
switch(newsel) {
|
switch(newsel) {
|
||||||
case 0:
|
case 0:
|
||||||
GUI.AspectWidth = 256;
|
GUI.AspectWidth = ASPECT_WIDTH_4_3;
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
GUI.AspectWidth = 299;
|
GUI.AspectWidth = ASPECT_WIDTH_8_7;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
GUI.AspectWidth = prevAspectWidth;
|
GUI.AspectWidth = prevAspectWidth;
|
||||||
|
@ -8301,7 +8359,7 @@ struct hotkey_dialog_item {
|
||||||
|
|
||||||
// this structure defines the four sub pages in the hotkey config dialog
|
// this structure defines the four sub pages in the hotkey config dialog
|
||||||
// to keep an entry blank, set the SCustomKey pointer to NULL and the text to an empty string
|
// to keep an entry blank, set the SCustomKey pointer to NULL and the text to an empty string
|
||||||
static hotkey_dialog_item hotkey_dialog_items[4][MAX_SWITCHABLE_HOTKEY_DIALOG_ITEMS] = {
|
static hotkey_dialog_item hotkey_dialog_items[MAX_SWITCHABLE_HOTKEY_DIALOG_PAGES][MAX_SWITCHABLE_HOTKEY_DIALOG_ITEMS] = {
|
||||||
{
|
{
|
||||||
{ &CustomKeys.SpeedUp, HOTKEYS_LABEL_1_1 },
|
{ &CustomKeys.SpeedUp, HOTKEYS_LABEL_1_1 },
|
||||||
{ &CustomKeys.SpeedDown, HOTKEYS_LABEL_1_2 },
|
{ &CustomKeys.SpeedDown, HOTKEYS_LABEL_1_2 },
|
||||||
|
@ -8366,6 +8424,22 @@ static hotkey_dialog_item hotkey_dialog_items[4][MAX_SWITCHABLE_HOTKEY_DIALOG_IT
|
||||||
{ NULL, _T("") },
|
{ NULL, _T("") },
|
||||||
{ NULL, _T("") },
|
{ NULL, _T("") },
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
{ &CustomKeys.AspectRatio, HOTKEYS_SWITCH_ASPECT_RATIO },
|
||||||
|
{ &CustomKeys.CheatEditorDialog, HOTKEYS_CHEAT_EDITOR_DIALOG },
|
||||||
|
{ &CustomKeys.CheatSearchDialog, HOTKEYS_CHEAT_SEARCH_DIALOG },
|
||||||
|
{ NULL, _T("") },
|
||||||
|
{ NULL, _T("") },
|
||||||
|
{ NULL, _T("") },
|
||||||
|
{ NULL, _T("") },
|
||||||
|
{ NULL, _T("") },
|
||||||
|
{ NULL, _T("") },
|
||||||
|
{ NULL, _T("") },
|
||||||
|
{ NULL, _T("") },
|
||||||
|
{ NULL, _T("") },
|
||||||
|
{ NULL, _T("") },
|
||||||
|
{ NULL, _T("") },
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
static void set_hotkeyinfo(HWND hDlg)
|
static void set_hotkeyinfo(HWND hDlg)
|
||||||
|
@ -8434,7 +8508,7 @@ switch(msg)
|
||||||
SetWindowText(hDlg,HOTKEYS_TITLE);
|
SetWindowText(hDlg,HOTKEYS_TITLE);
|
||||||
|
|
||||||
// insert hotkey page list items
|
// insert hotkey page list items
|
||||||
for(i=1 ; i <= 4 ; i++)
|
for(i=1 ; i <= MAX_SWITCHABLE_HOTKEY_DIALOG_PAGES; i++)
|
||||||
{
|
{
|
||||||
TCHAR temp[256];
|
TCHAR temp[256];
|
||||||
_stprintf(temp,HOTKEYS_HKCOMBO,i);
|
_stprintf(temp,HOTKEYS_HKCOMBO,i);
|
||||||
|
@ -10095,7 +10169,12 @@ INT_PTR CALLBACK DlgCheatSearch(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lPara
|
||||||
default: break;
|
default: break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
default: return false;
|
case WM_MENUCHAR:
|
||||||
|
// get rid of asterisk sound when pressing non existing menu hotkey - would play when opening
|
||||||
|
// with default alt + a hotkey
|
||||||
|
SetWindowLong(hDlg, DWLP_MSGRESULT, (MNC_CLOSE << 16));
|
||||||
|
return true;
|
||||||
|
default: return false;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -10120,6 +10199,7 @@ INT_PTR CALLBACK DlgCheatSearchAdd(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lP
|
||||||
memset(buf,0,sizeof(TCHAR) * 12);
|
memset(buf,0,sizeof(TCHAR) * 12);
|
||||||
_stprintf(buf, TEXT("%u"), new_cheat->new_val);
|
_stprintf(buf, TEXT("%u"), new_cheat->new_val);
|
||||||
SetDlgItemText(hDlg, IDC_NC_CURRVAL, buf);
|
SetDlgItemText(hDlg, IDC_NC_CURRVAL, buf);
|
||||||
|
SetDlgItemText(hDlg, IDC_NC_NEWVAL, buf);
|
||||||
memset(buf,0,sizeof(TCHAR) * 12);
|
memset(buf,0,sizeof(TCHAR) * 12);
|
||||||
_stprintf(buf, TEXT("%u"), new_cheat->saved_val);
|
_stprintf(buf, TEXT("%u"), new_cheat->saved_val);
|
||||||
SetDlgItemText(hDlg, IDC_NC_PREVVAL, buf);
|
SetDlgItemText(hDlg, IDC_NC_PREVVAL, buf);
|
||||||
|
@ -10301,6 +10381,11 @@ INT_PTR CALLBACK DlgCheatSearchAdd(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lP
|
||||||
|
|
||||||
ret=0;
|
ret=0;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
MessageBox(hDlg, SEARCH_ERR_INVALIDNEWVALUE, SEARCH_TITLE_RANGEERROR, MB_OK);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
case IDCANCEL:
|
case IDCANCEL:
|
||||||
|
|
|
@ -39,6 +39,9 @@
|
||||||
#define NUM_SAVE_BANKS 10
|
#define NUM_SAVE_BANKS 10
|
||||||
#define LAST_SAVE_BANK (NUM_SAVE_BANKS - 1)
|
#define LAST_SAVE_BANK (NUM_SAVE_BANKS - 1)
|
||||||
|
|
||||||
|
constexpr int ASPECT_WIDTH_4_3 = 256;
|
||||||
|
constexpr int ASPECT_WIDTH_8_7 = 299;
|
||||||
|
|
||||||
#include "_tfwopen.h"
|
#include "_tfwopen.h"
|
||||||
#ifdef UNICODE
|
#ifdef UNICODE
|
||||||
#define _tToChar WideToUtf8
|
#define _tToChar WideToUtf8
|
||||||
|
@ -348,6 +351,9 @@ struct SCustomKeys {
|
||||||
SCustomKey SaveFileSelect;
|
SCustomKey SaveFileSelect;
|
||||||
SCustomKey LoadFileSelect;
|
SCustomKey LoadFileSelect;
|
||||||
SCustomKey Mute;
|
SCustomKey Mute;
|
||||||
|
SCustomKey AspectRatio;
|
||||||
|
SCustomKey CheatEditorDialog;
|
||||||
|
SCustomKey CheatSearchDialog;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct SJoypad {
|
struct SJoypad {
|
||||||
|
|
Loading…
Add table
Reference in a new issue