diff --git a/Capy64/Capy64.cs b/Capy64/Capy64.cs index 3cbb077..fb41248 100644 --- a/Capy64/Capy64.cs +++ b/Capy64/Capy64.cs @@ -150,6 +150,8 @@ public class Capy64 : Game, IGame break; } + EngineMode = mode; + UpdateSize(true); } @@ -179,6 +181,11 @@ public class Capy64 : Game, IGame private void OnWindowSizeChange(object sender, EventArgs e) { + if (EngineMode == EngineMode.Classic) { + UpdateSize(true); + return; + } + var bounds = Window.ClientBounds; Width = (int)(bounds.Width / Scale); diff --git a/Capy64/Runtime/Libraries/GPULib.cs b/Capy64/Runtime/Libraries/GPULib.cs index 504fde8..7b7e6f7 100644 --- a/Capy64/Runtime/Libraries/GPULib.cs +++ b/Capy64/Runtime/Libraries/GPULib.cs @@ -157,8 +157,6 @@ public class GPULib : IComponent public static void GetColor(uint c, out byte r, out byte g, out byte b) { - /*if (_game.EngineMode == EngineMode.Classic) - c = ColorPalette.GetColor(c);*/ Utils.UnpackRGB(c, out r, out g, out b); } diff --git a/Capy64/Runtime/Objects/FileHandle.cs b/Capy64/Runtime/Objects/FileHandle.cs index feea597..615ba66 100644 --- a/Capy64/Runtime/Objects/FileHandle.cs +++ b/Capy64/Runtime/Objects/FileHandle.cs @@ -200,7 +200,7 @@ public class FileHandle : IComponent return 2; } - return G_Read(L, stream, 1); + return G_Read(L, stream, 2); } private static int G_Read(Lua L, Stream f, int first)