FPS switching delay. Probably should be in milliseconds.
This commit is contained in:
2
Makefile
2
Makefile
@@ -15,7 +15,7 @@ endif
|
|||||||
CC = clang
|
CC = clang
|
||||||
|
|
||||||
UFLAGS =
|
UFLAGS =
|
||||||
FLAGS = -Wall -Wextra -ggdb -fno-caret-diagnostics -fno-show-column -Wno-missing-field-initializers -Wno-unused-parameter -Wno-unused-variable -Wno-unused-but-set-variable
|
FLAGS = -Wall -Wextra -ggdb -fno-caret-diagnostics -fno-show-column -Wno-missing-field-initializers -Wno-unused-function -Wno-unused-parameter -Wno-unused-variable -Wno-unused-but-set-variable
|
||||||
#-std=c99 -pedantic
|
#-std=c99 -pedantic
|
||||||
|
|
||||||
ifeq ($(DETECTED_OS),macos)
|
ifeq ($(DETECTED_OS),macos)
|
||||||
|
|||||||
@@ -486,7 +486,6 @@ S32 main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
|
|
||||||
DrawFPS(20, 20);
|
DrawFPS(20, 20);
|
||||||
|
|
||||||
EndDrawing();
|
EndDrawing();
|
||||||
|
|
||||||
// Reset statistics as we will accumulate seconds again.
|
// Reset statistics as we will accumulate seconds again.
|
||||||
@@ -502,9 +501,12 @@ S32 main(int argc, char *argv[])
|
|||||||
|
|
||||||
if(is_dirty()) {
|
if(is_dirty()) {
|
||||||
clear_dirty();
|
clear_dirty();
|
||||||
SetTargetFPS(120); // FPS cap
|
SetTargetFPS(120); // FPS cap
|
||||||
} else {
|
} else {
|
||||||
SetTargetFPS(20);
|
if(now_s - last_input_s > 1) {
|
||||||
|
SetTargetFPS(20);
|
||||||
|
last_input_s = now_s;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user