Difference between revisions of "HOWTO-Backends"

Jump to navigation Jump to search
18 bytes added ,  15:07, 25 October 2018
m
Text replacement - "<source lang=" to "<syntaxhighlight lang="
(Added note about testbed)
m (Text replacement - "<source lang=" to "<syntaxhighlight lang=")
Line 24: Line 24:


==== Example of minimal main() ====
==== Example of minimal main() ====
<source lang="cpp">int main(int argc, char *argv[]) {
<syntaxhighlight lang="cpp">int main(int argc, char *argv[]) {
     g_system = new OSystem_Foobar();
     g_system = new OSystem_Foobar();
     assert(g_system);
     assert(g_system);
Line 52: Line 52:
If you are writing a backend for such a system, you may use code like this:
If you are writing a backend for such a system, you may use code like this:


<source lang="cpp">void updateScreen() {
<syntaxhighlight lang="cpp">void updateScreen() {
     uint32 newTime = getMillis();
     uint32 newTime = getMillis();
     if (newTime - _oldTime < 1000 / MAX_FPS)
     if (newTime - _oldTime < 1000 / MAX_FPS)
TrustedUser
2,147

edits

Navigation menu