Fix VSYNC

This commit is contained in:
otya128 committed 2016-12-10 17:10:37 +09:00
1 parent 92e5f3abc4
commit 9788cd9e55
2 files changed
+11 -3

No files matched your search

+10 -3
View File
@@ -268,10 +268,17 @@ class BuiltinFunction
{ {
return p.console.width; return p.console.width;
} }
static void VSYNC(PetitComputer p, DefaultValue!int time) static void VSYNC(PetitComputer p)
{ {
time.setDefaultValue(1); VSYNC(p, 1);
p.vsync(cast(int)time); }
static void VSYNC(PetitComputer p, int time)
{
if (time == 0)
{
return;
}
p.vsync(time);
} }
static void WAIT(PetitComputer p, DefaultValue!int time) static void WAIT(PetitComputer p, DefaultValue!int time)
{ {
+1
View File
@@ -293,6 +293,7 @@ class Console
scope (exit) scope (exit)
{ {
glLoadIdentity(); glLoadIdentity();
petitcom.chScreen(0, 0, 400, 240);
} }
synchronized(this) synchronized(this)
{ {