1
0

Fix VSYNC

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

View File

@@ -268,10 +268,17 @@ class BuiltinFunction
{
return p.console.width;
}
static void VSYNC(PetitComputer p, DefaultValue!int time)
static void VSYNC(PetitComputer p)
{
time.setDefaultValue(1);
p.vsync(cast(int)time);
VSYNC(p, 1);
}
static void VSYNC(PetitComputer p, int time)
{
if (time == 0)
{
return;
}
p.vsync(time);
}
static void WAIT(PetitComputer p, DefaultValue!int time)
{

View File

@@ -293,6 +293,7 @@ class Console
scope (exit)
{
glLoadIdentity();
petitcom.chScreen(0, 0, 400, 240);
}
synchronized(this)
{