void eUSPInstance::Update(int32_t result) { pp::Module::Get()->core()->CallOnMainThread(17, callback.NewRequiredCallback(&eUSPInstance::Update)); Handler()->OnLoop(); audio.Update(); Draw(); }
bool eUSPInstance::SpecialKeyDown(const pp::KeyboardInputEvent event) { int key = event.GetKeyCode(); enum { K_F12 = 123 }; if(key == K_F12) { Handler()->OnAction(A_RESET); return true; } else if(key == 'F' && event.GetModifiers()&PP_INPUTEVENT_MODIFIER_CONTROLKEY) { full_screen.SetFullscreen(!full_screen.IsFullscreen()); if(!mouse_locked) { LockMouse(callback.NewRequiredCallback(&eUSPInstance::DidLockMouse)); } return true; } return false; }