//Show the play movie dialog and play a movie void Replay_LoadMovie() { char* fn = (char*)DialogBoxParam(hAppInst, "IDD_REPLAYINP", GetMainHWND(), ReplayDialogProc, false); if(fn) { FCEUI_LoadMovie(fn, movie_readonly, false, 100000); free(fn); } }
static void UpdateBackgroundAccess(bool enable) { if(!deviceHandle) return; static bool bkgModeEnabled = false; if(bkgModeEnabled != enable) { bkgModeEnabled = enable; if(!directinput::SetCoopLevel(deviceHandle, GetMainHWND(), bkgModeEnabled)) { FCEUD_PrintError("DirectInput: Error setting keyboard cooperative level."); return; } directinput::Acquire(deviceHandle); } }
//Show the record movie dialog and record a movie. void MovieRecordTo() { DialogBoxParam(hAppInst, MAKEINTRESOURCE(IDD_RECORDMOVIE), GetMainHWND(), RecordDialogProc, (LPARAM)0); }
int driver::input::keyboard::Init() { if(deviceHandle) return(1); deviceHandle = directinput::CreateDevice(GUID_SysKeyboard); if(deviceHandle == NULL) { FCEUD_PrintError("DirectInput: Error creating keyboard device."); return 0; } if(!directinput::SetCoopLevel(deviceHandle, GetMainHWND(), (backgroundInputBits!=0))) { FCEUD_PrintError("DirectInput: Error setting keyboard cooperative level."); return 0; } directinput::Acquire(deviceHandle); // any key with scancode not in this list will be ignored validKeyMask[DIK_ESCAPE] = 1; validKeyMask[DIK_1] = 1; validKeyMask[DIK_2] = 1; validKeyMask[DIK_3] = 1; validKeyMask[DIK_4] = 1; validKeyMask[DIK_5] = 1; validKeyMask[DIK_6] = 1; validKeyMask[DIK_7] = 1; validKeyMask[DIK_8] = 1; validKeyMask[DIK_9] = 1; validKeyMask[DIK_0] = 1; validKeyMask[DIK_MINUS] = 1; validKeyMask[DIK_EQUALS] = 1; validKeyMask[DIK_BACK] = 1; validKeyMask[DIK_TAB] = 1; validKeyMask[DIK_Q] = 1; validKeyMask[DIK_W] = 1; validKeyMask[DIK_E] = 1; validKeyMask[DIK_R] = 1; validKeyMask[DIK_T] = 1; validKeyMask[DIK_Y] = 1; validKeyMask[DIK_U] = 1; validKeyMask[DIK_I] = 1; validKeyMask[DIK_O] = 1; validKeyMask[DIK_P] = 1; validKeyMask[DIK_LBRACKET] = 1; validKeyMask[DIK_RBRACKET] = 1; validKeyMask[DIK_RETURN] = 1; validKeyMask[DIK_LCONTROL] = 1; validKeyMask[DIK_A] = 1; validKeyMask[DIK_S] = 1; validKeyMask[DIK_D] = 1; validKeyMask[DIK_F] = 1; validKeyMask[DIK_G] = 1; validKeyMask[DIK_H] = 1; validKeyMask[DIK_J] = 1; validKeyMask[DIK_K] = 1; validKeyMask[DIK_L] = 1; validKeyMask[DIK_SEMICOLON] = 1; validKeyMask[DIK_APOSTROPHE] = 1; validKeyMask[DIK_GRAVE] = 1; validKeyMask[DIK_LSHIFT] = 1; validKeyMask[DIK_BACKSLASH] = 1; validKeyMask[DIK_Z] = 1; validKeyMask[DIK_X] = 1; validKeyMask[DIK_C] = 1; validKeyMask[DIK_V] = 1; validKeyMask[DIK_B] = 1; validKeyMask[DIK_N] = 1; validKeyMask[DIK_M] = 1; validKeyMask[DIK_COMMA] = 1; validKeyMask[DIK_PERIOD] = 1; validKeyMask[DIK_SLASH] = 1; validKeyMask[DIK_RSHIFT] = 1; validKeyMask[DIK_MULTIPLY] = 1; validKeyMask[DIK_LMENU] = 1; validKeyMask[DIK_SPACE] = 1; validKeyMask[DIK_CAPITAL] = 1; validKeyMask[DIK_F1] = 1; validKeyMask[DIK_F2] = 1; validKeyMask[DIK_F3] = 1; validKeyMask[DIK_F4] = 1; validKeyMask[DIK_F5] = 1; validKeyMask[DIK_F6] = 1; validKeyMask[DIK_F7] = 1; validKeyMask[DIK_F8] = 1; validKeyMask[DIK_F9] = 1; validKeyMask[DIK_F10] = 1; validKeyMask[DIK_NUMLOCK] = 1; validKeyMask[DIK_SCROLL] = 1; validKeyMask[DIK_NUMPAD7] = 1; validKeyMask[DIK_NUMPAD8] = 1; validKeyMask[DIK_NUMPAD9] = 1; validKeyMask[DIK_SUBTRACT] = 1; validKeyMask[DIK_NUMPAD4] = 1; validKeyMask[DIK_NUMPAD5] = 1; validKeyMask[DIK_NUMPAD6] = 1; validKeyMask[DIK_ADD] = 1; validKeyMask[DIK_NUMPAD1] = 1; validKeyMask[DIK_NUMPAD2] = 1; validKeyMask[DIK_NUMPAD3] = 1; validKeyMask[DIK_NUMPAD0] = 1; validKeyMask[DIK_DECIMAL] = 1; validKeyMask[DIK_OEM_102] = 1; validKeyMask[DIK_F11] = 1; validKeyMask[DIK_F12] = 1; validKeyMask[DIK_F13] = 1; validKeyMask[DIK_F14] = 1; validKeyMask[DIK_F15] = 1; validKeyMask[DIK_KANA] = 1; validKeyMask[DIK_ABNT_C1] = 1; validKeyMask[DIK_CONVERT] = 1; validKeyMask[DIK_NOCONVERT] = 1; validKeyMask[DIK_YEN] = 1; validKeyMask[DIK_ABNT_C2] = 1; validKeyMask[DIK_NUMPADEQUALS] = 1; validKeyMask[DIK_PREVTRACK] = 1; validKeyMask[DIK_AT] = 1; validKeyMask[DIK_COLON] = 1; validKeyMask[DIK_UNDERLINE] = 1; validKeyMask[DIK_KANJI] = 1; validKeyMask[DIK_STOP] = 1; validKeyMask[DIK_AX] = 1; validKeyMask[DIK_UNLABELED] = 1; validKeyMask[DIK_NEXTTRACK] = 1; validKeyMask[DIK_NUMPADENTER] = 1; validKeyMask[DIK_RCONTROL] = 1; validKeyMask[DIK_MUTE] = 1; validKeyMask[DIK_CALCULATOR] = 1; validKeyMask[DIK_PLAYPAUSE] = 1; validKeyMask[DIK_MEDIASTOP] = 1; validKeyMask[DIK_VOLUMEDOWN] = 1; validKeyMask[DIK_VOLUMEUP] = 1; validKeyMask[DIK_WEBHOME] = 1; validKeyMask[DIK_NUMPADCOMMA] = 1; validKeyMask[DIK_DIVIDE] = 1; validKeyMask[DIK_SYSRQ] = 1; validKeyMask[DIK_RMENU] = 1; validKeyMask[DIK_PAUSE] = 1; validKeyMask[DIK_HOME] = 1; validKeyMask[DIK_UP] = 1; validKeyMask[DIK_PRIOR] = 1; validKeyMask[DIK_LEFT] = 1; validKeyMask[DIK_RIGHT] = 1; validKeyMask[DIK_END] = 1; validKeyMask[DIK_DOWN] = 1; validKeyMask[DIK_NEXT] = 1; validKeyMask[DIK_INSERT] = 1; validKeyMask[DIK_DELETE] = 1; validKeyMask[DIK_LWIN] = 1; validKeyMask[DIK_RWIN] = 1; validKeyMask[DIK_APPS] = 1; validKeyMask[DIK_POWER] = 1; validKeyMask[DIK_SLEEP] = 1; validKeyMask[DIK_WAKE] = 1; validKeyMask[DIK_WEBSEARCH] = 1; validKeyMask[DIK_WEBFAVORITES] = 1; validKeyMask[DIK_WEBREFRESH] = 1; validKeyMask[DIK_WEBSTOP] = 1; validKeyMask[DIK_WEBFORWARD] = 1; validKeyMask[DIK_WEBBACK] = 1; validKeyMask[DIK_MYCOMPUTER] = 1; validKeyMask[DIK_MAIL] = 1; validKeyMask[DIK_MEDIASELECT] = 1; return 1; }