I want to be able to change the window size dynamically. Basically I want the user to have the option of changing the resolutions.
The first issue I was having was the newly re-sized window would be black, not showing any sprites, even though I was reloading the correct new images.
The bigger issue is an AccessViolationException that occurs on
DarkGDK.Core.Sync() after the window changes size. Here is the code I am using the change the window size...
bool hasRes = DarkGDK.Display.CheckDisplayMode(width, height, 32);
if (hasRes)
{
DarkGDK.Display.SetDisplayMode(width, height, 32);
}
DarkGDK.Display.SetWindowPosition((DarkGDK.Display.DesktopWidth() / 2) - (width / 2),
(DarkGDK.Display.DesktopHeight() - height) / 2);
Does anyone know how I can dynamically change the window size?