mirror of
https://github.com/AxioDL/boo.git
synced 2025-12-14 07:36:26 +00:00
Fullscreen fix
This commit is contained in:
@@ -278,12 +278,14 @@ struct TestApplicationCallback : IApplicationCallback
|
||||
mainWindow = app->newWindow(_S("YAY!"));
|
||||
mainWindow->setCallback(&windowCallback);
|
||||
mainWindow->showWindow();
|
||||
mainWindow->setFullscreen(true);
|
||||
devFinder.startScanning();
|
||||
|
||||
IGraphicsCommandQueue* gfxQ = mainWindow->getCommandQueue();
|
||||
std::thread loaderThread(LoaderProc, this);
|
||||
|
||||
size_t frameIdx = 0;
|
||||
size_t lastCheck = 0;
|
||||
while (running)
|
||||
{
|
||||
mainWindow->waitForRetrace();
|
||||
@@ -300,6 +302,12 @@ struct TestApplicationCallback : IApplicationCallback
|
||||
gfxQ->execute();
|
||||
|
||||
fprintf(stderr, "%zu\n", frameIdx++);
|
||||
|
||||
if ((frameIdx - lastCheck) > 100)
|
||||
{
|
||||
lastCheck = frameIdx;
|
||||
mainWindow->setFullscreen(!mainWindow->isFullscreen());
|
||||
}
|
||||
}
|
||||
|
||||
m_cv.notify_one();
|
||||
|
||||
Reference in New Issue
Block a user