Commit 080d5a44 authored by Subs's avatar Subs

The screensaver prevented from launching a ROM

parent dc52ba24
......@@ -119,6 +119,6 @@ FileData* CommandThread::findRecursive(std::vector<FileData*> gameFolder, std::s
void CommandThread::runGame (FileData* game) {
ViewController *view = ViewController::get();
Eigen::Vector3f target(Renderer::getScreenWidth() / 2.0f, Renderer::getScreenHeight() / 2.0f, 0);
//mWindow->wakeUp();
mWindow->doWake();
view->launch(game, target);
}
......@@ -395,6 +395,7 @@ void Window::onSleep()
}
void Window::onWake()
{
......@@ -416,3 +417,10 @@ void Window::renderScreenSaver()
unsigned char opacity = Settings::getInstance()->getString("ScreenSaverBehavior") == "dim" ? 0xA0 : 0xFF;
Renderer::drawRect(0, 0, Renderer::getScreenWidth(), Renderer::getScreenHeight(), 0x00000000 | opacity);
}
void Window::doWake()
{
mTimeSinceLastInput = 0;
mSleeping = false;
onWake();
}
......@@ -40,6 +40,8 @@ public:
void setHelpPrompts(const std::vector<HelpPrompt>& prompts, const HelpStyle& style);
void renderShutdownScreen();
void doWake();
private:
void onSleep();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment