[Scummvm-git-logs] scummvm master -> e4fdb7aba9c03bcd4bc709e6f9ef9e8fe5871330
dreammaster
noreply at scummvm.org
Sat Mar 9 15:35:40 UTC 2024
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
e4fdb7aba9 CREATE_ENGINE: use the FrameLimiter class in xyzzy template
Commit: e4fdb7aba9c03bcd4bc709e6f9ef9e8fe5871330
https://github.com/scummvm/scummvm/commit/e4fdb7aba9c03bcd4bc709e6f9ef9e8fe5871330
Author: Martin Gerhardy (martin.gerhardy at gmail.com)
Date: 2024-03-09T07:35:37-08:00
Commit Message:
CREATE_ENGINE: use the FrameLimiter class in xyzzy template
Changed paths:
devtools/create_engine/files/xyzzy.cpp
diff --git a/devtools/create_engine/files/xyzzy.cpp b/devtools/create_engine/files/xyzzy.cpp
index fdf65322155..17ccc8fd6e0 100644
--- a/devtools/create_engine/files/xyzzy.cpp
+++ b/devtools/create_engine/files/xyzzy.cpp
@@ -20,6 +20,7 @@
*/
#include "xyzzy/xyzzy.h"
+#include "graphics/framelimiter.h"
#include "xyzzy/detection.h"
#include "xyzzy/console.h"
#include "common/scummsys.h"
@@ -74,6 +75,7 @@ Common::Error XyzzyEngine::run() {
Common::Event e;
int offset = 0;
+ Graphics::FrameLimiter limiter(g_system, 60);
while (!shouldQuit()) {
while (g_system->getEventManager()->pollEvent(e)) {
}
@@ -83,11 +85,11 @@ Common::Error XyzzyEngine::run() {
for (int i = 0; i < 256; ++i)
pal[i * 3 + 1] = (i + offset) % 256;
g_system->getPaletteManager()->setPalette(pal, 0, 256);
- _screen->update();
-
// Delay for a bit. All events loops should have a delay
// to prevent the system being unduly loaded
- g_system->delayMillis(10);
+ limiter.delayBeforeSwap();
+ _screen->update();
+ limiter.startFrame();
}
return Common::kNoError;
More information about the Scummvm-git-logs
mailing list