mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-26 07:39:45 -06:00
Several little things:
Clean up of the input selected for the opengl x window in linux. Fix a potential segfault when taking a screenshot (happens consistently when using "Save Targets" from the video debugger window). Fix a memory corruption error that results from the wrong image size being passed when dumping textures. Make the screenshot hotkey configurable. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6067 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -34,6 +34,7 @@ static const struct {
|
||||
{ "ToggleFullscreen", 13 /* WXK_RETURN */, 0x0001 /* wxMOD_ALT */ },
|
||||
{ "PlayPause", 349 /* WXK_F10 */, 0x0000 /* wxMOD_NONE */ },
|
||||
{ "Stop", 27 /* WXK_ESCAPE */, 0x0000 /* wxMOD_NONE */ },
|
||||
{ "Screenshot", 348 /* WXK_F9 */, 0x0000 /* wxMOD_NONE */ },
|
||||
{ "Wiimote1Connect", 344 /* WXK_F5 */, 0x0001 /* wxMOD_ALT */ },
|
||||
{ "Wiimote2Connect", 345 /* WXK_F6 */, 0x0001 /* wxMOD_ALT */ },
|
||||
{ "Wiimote3Connect", 346 /* WXK_F7 */, 0x0001 /* wxMOD_ALT */ },
|
||||
|
@ -25,6 +25,7 @@ enum Hotkey {
|
||||
HK_FULLSCREEN,
|
||||
HK_PLAY_PAUSE,
|
||||
HK_STOP,
|
||||
HK_SCREENSHOT,
|
||||
HK_WIIMOTE1_CONNECT,
|
||||
HK_WIIMOTE2_CONNECT,
|
||||
HK_WIIMOTE3_CONNECT,
|
||||
|
@ -744,6 +744,9 @@ void CFrame::OnKeyDown(wxKeyEvent& event)
|
||||
// Stop
|
||||
else if (IsHotkey(event, HK_STOP))
|
||||
DoStop();
|
||||
// Screenshot hotkey
|
||||
else if (IsHotkey(event, HK_SCREENSHOT))
|
||||
Core::ScreenShot();
|
||||
// Wiimote connect and disconnect hotkeys
|
||||
else if (IsHotkey(event, HK_WIIMOTE1_CONNECT))
|
||||
WiimoteId = 0;
|
||||
@ -753,7 +756,7 @@ void CFrame::OnKeyDown(wxKeyEvent& event)
|
||||
WiimoteId = 2;
|
||||
else if (IsHotkey(event, HK_WIIMOTE4_CONNECT))
|
||||
WiimoteId = 3;
|
||||
// state save and state load hotkeys
|
||||
// State save and state load hotkeys
|
||||
else if (event.GetKeyCode() >= WXK_F1 && event.GetKeyCode() <= WXK_F8)
|
||||
{
|
||||
int slot_number = event.GetKeyCode() - WXK_F1 + 1;
|
||||
@ -775,9 +778,6 @@ void CFrame::OnKeyDown(wxKeyEvent& event)
|
||||
else
|
||||
event.Skip();
|
||||
}
|
||||
// screenshot hotkeys
|
||||
else if (event.GetKeyCode() == WXK_F9 && event.GetModifiers() == wxMOD_NONE)
|
||||
Core::ScreenShot();
|
||||
else
|
||||
event.Skip();
|
||||
|
||||
|
@ -144,7 +144,7 @@ void CFrame::CreateMenu()
|
||||
skippingMenu->Append(IDM_FRAMESKIP0 + i, wxString::Format(_T("%i"), i), wxEmptyString, wxITEM_RADIO);
|
||||
|
||||
emulationMenu->AppendSeparator();
|
||||
emulationMenu->Append(IDM_SCREENSHOT, _T("Take S&creenshot\tF9"));
|
||||
emulationMenu->Append(IDM_SCREENSHOT, GetMenuLabel(HK_SCREENSHOT));
|
||||
|
||||
emulationMenu->AppendSeparator();
|
||||
wxMenu *saveMenu = new wxMenu;
|
||||
@ -311,6 +311,9 @@ wxString CFrame::GetMenuLabel(int Id)
|
||||
case HK_STOP:
|
||||
Label = _T("&Stop\t");
|
||||
break;
|
||||
case HK_SCREENSHOT:
|
||||
Label = _T("Take Screenshot\t");
|
||||
break;
|
||||
case HK_WIIMOTE1_CONNECT:
|
||||
case HK_WIIMOTE2_CONNECT:
|
||||
case HK_WIIMOTE3_CONNECT:
|
||||
@ -1280,6 +1283,7 @@ void CFrame::UpdateGUI()
|
||||
GetMenuBar()->FindItem(IDM_TOGGLE_FULLSCREEN)->SetItemLabel(GetMenuLabel(HK_FULLSCREEN));
|
||||
GetMenuBar()->FindItem(IDM_PLAY)->SetItemLabel(GetMenuLabel(HK_PLAY_PAUSE));
|
||||
GetMenuBar()->FindItem(IDM_STOP)->SetItemLabel(GetMenuLabel(HK_STOP));
|
||||
GetMenuBar()->FindItem(IDM_SCREENSHOT)->SetItemLabel(GetMenuLabel(HK_SCREENSHOT));
|
||||
GetMenuBar()->FindItem(IDM_CONNECT_WIIMOTE1)->SetItemLabel(GetMenuLabel(HK_WIIMOTE1_CONNECT));
|
||||
GetMenuBar()->FindItem(IDM_CONNECT_WIIMOTE2)->SetItemLabel(GetMenuLabel(HK_WIIMOTE2_CONNECT));
|
||||
GetMenuBar()->FindItem(IDM_CONNECT_WIIMOTE3)->SetItemLabel(GetMenuLabel(HK_WIIMOTE3_CONNECT));
|
||||
|
@ -191,6 +191,7 @@ void HotkeyConfigDialog::CreateHotkeyGUIControls(void)
|
||||
wxT("Toggle Fullscreen"),
|
||||
wxT("Play/Pause"),
|
||||
wxT("Stop"),
|
||||
wxT("Take Screenshot"),
|
||||
wxT("Connect Wiimote 1"),
|
||||
wxT("Connect Wiimote 2"),
|
||||
wxT("Connect Wiimote 3"),
|
||||
|
@ -138,7 +138,7 @@ void X11_MainLoop()
|
||||
|
||||
Display *dpy = XOpenDisplay(0);
|
||||
Window win = (Window)Core::GetWindowHandle();
|
||||
XSelectInput(dpy, win, KeyPressMask | KeyReleaseMask | FocusChangeMask);
|
||||
XSelectInput(dpy, win, KeyPressMask | FocusChangeMask);
|
||||
|
||||
#if defined(HAVE_XRANDR) && HAVE_XRANDR
|
||||
X11Utils::XRRConfiguration *XRRConfig = new X11Utils::XRRConfiguration(dpy, win);
|
||||
|
Reference in New Issue
Block a user