Fix VSYNC
This commit is contained in:
@@ -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)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -293,6 +293,7 @@ class Console
|
|||||||
scope (exit)
|
scope (exit)
|
||||||
{
|
{
|
||||||
glLoadIdentity();
|
glLoadIdentity();
|
||||||
|
petitcom.chScreen(0, 0, 400, 240);
|
||||||
}
|
}
|
||||||
synchronized(this)
|
synchronized(this)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user