Win32 - Made fullscreen toggle (alt+enter) remappable
This commit is contained in:
parent
7fcd1f8683
commit
6f4162641b
|
@ -1,4 +1,5 @@
|
|||
15-max-2009 - shinydoofy - sdl - added --subtitles
|
||||
21-may-2009 - adelikat - win32 - made fullscreen toggle (Alt+Enter) remappable
|
||||
15-may-2009 - shinydoofy - sdl - added --subtitles
|
||||
10-may-2009 - shinydoofy - sdl - fixed Four Score movie playback
|
||||
02-may-2009 - adelikat - win32 - stop movie at frame x feature - fixed off by 1 error
|
||||
23-apr-2009 - shinydoofy - sdl - added --ripsubs for converting fm2 movie subtitles to an srt file
|
||||
|
|
|
@ -70,6 +70,7 @@ static struct
|
|||
{ EMUCMD_OPENROM, SCAN_O | CMD_KEY_CTRL, },
|
||||
{ EMUCMD_CLOSEROM, SCAN_W | CMD_KEY_CTRL, },
|
||||
{ EMUCMD_MISC_UNDOREDOSAVESTATE, SCAN_Z | CMD_KEY_CTRL, },
|
||||
{ EMUCMD_MISC_TOGGLEFULLSCREEN, SCAN_ENTER | CMD_KEY_ALT, },
|
||||
};
|
||||
|
||||
#define NUM_DEFAULT_MAPPINGS (sizeof(DefaultCommandMapping)/sizeof(DefaultCommandMapping[0]))
|
||||
|
|
|
@ -1596,7 +1596,7 @@ LRESULT FAR PASCAL AppWndProc(HWND hWnd,UINT msg,WPARAM wParam,LPARAM lParam)
|
|||
|
||||
if(wParam==VK_F10)
|
||||
break; // 11.12.08 CH4 Disable F10 as System Key dammit
|
||||
|
||||
/*
|
||||
if(wParam == VK_RETURN)
|
||||
{
|
||||
if(!(lParam&(1<<30)))
|
||||
|
@ -1609,6 +1609,8 @@ LRESULT FAR PASCAL AppWndProc(HWND hWnd,UINT msg,WPARAM wParam,LPARAM lParam)
|
|||
}
|
||||
break;
|
||||
}
|
||||
adelikat: Outsourced this to a remappable hotkey
|
||||
*/
|
||||
goto proco;
|
||||
|
||||
case WM_KEYDOWN:
|
||||
|
|
|
@ -615,6 +615,7 @@ static void CloseRom(void);
|
|||
static void MovieSubtitleToggle(void);
|
||||
static void UndoRedoSavestate(void);
|
||||
static void FCEUI_DoExit(void);
|
||||
static void ToggleFullscreen(void);
|
||||
|
||||
struct EMUCMDTABLE FCEUI_CommandTable[]=
|
||||
{
|
||||
|
@ -726,7 +727,8 @@ struct EMUCMDTABLE FCEUI_CommandTable[]=
|
|||
{ EMUCMD_OPENROM, EMUCMDTYPE_TOOL, OpenRom, 0, 0, "Open ROM", 0},
|
||||
{ EMUCMD_CLOSEROM, EMUCMDTYPE_TOOL, CloseRom, 0, 0, "Close ROM", 0},
|
||||
{ EMUCMD_MISC_DISPLAY_MOVIESUBTITLES, EMUCMDTYPE_MISC, MovieSubtitleToggle,0,0,"Toggle Movie Subtitles", 0},
|
||||
{ EMUCMD_MISC_UNDOREDOSAVESTATE, EMUCMDTYPE_MISC, UndoRedoSavestate, 0,0,"Undo/Redo Savestate", 0}
|
||||
{ EMUCMD_MISC_UNDOREDOSAVESTATE, EMUCMDTYPE_MISC, UndoRedoSavestate, 0,0,"Undo/Redo Savestate", 0},
|
||||
{ EMUCMD_MISC_TOGGLEFULLSCREEN, EMUCMDTYPE_MISC, ToggleFullscreen, 0, 0, "Toggle Fullscreen", 0}
|
||||
};
|
||||
|
||||
#define NUM_EMU_CMDS (sizeof(FCEUI_CommandTable)/sizeof(FCEUI_CommandTable[0]))
|
||||
|
@ -949,4 +951,18 @@ static void FCEUI_DoExit(void)
|
|||
#ifdef WIN32
|
||||
DoFCEUExit();
|
||||
#endif
|
||||
}
|
||||
|
||||
static void ToggleFullscreen(void)
|
||||
{
|
||||
#ifdef WIN32
|
||||
extern int SetVideoMode(int fs); //adelikat: Yeah, I know, hacky
|
||||
extern void UpdateCheckedMenuItems();
|
||||
|
||||
UpdateCheckedMenuItems();
|
||||
changerecursive=1;
|
||||
if(!SetVideoMode(fullscreen^1))
|
||||
SetVideoMode(fullscreen);
|
||||
changerecursive=0;
|
||||
#endif
|
||||
}
|
|
@ -218,6 +218,7 @@ enum EMUCMD
|
|||
//-----------------------------
|
||||
EMUCMD_MISC_DISPLAY_MOVIESUBTITLES,
|
||||
EMUCMD_MISC_UNDOREDOSAVESTATE,
|
||||
EMUCMD_MISC_TOGGLEFULLSCREEN,
|
||||
EMUCMD_MAX
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue