Lua - implement client.setwindowsize()
This commit is contained in:
parent
e534c5b133
commit
f5a7dc2191
|
@ -401,6 +401,7 @@ namespace BizHawk.MultiClient
|
|||
};
|
||||
|
||||
public static string[] MultiClientFunctions = new string[] {
|
||||
"setwindowsize",
|
||||
"openrom",
|
||||
"closerom",
|
||||
"opentoolbox",
|
||||
|
@ -1765,6 +1766,30 @@ namespace BizHawk.MultiClient
|
|||
Global.MainForm.LoadTAStudio();
|
||||
}
|
||||
|
||||
public void client_setwindowsize(object window_size)
|
||||
{
|
||||
try
|
||||
{
|
||||
string temp = window_size.ToString();
|
||||
int size = Convert.ToInt32(temp);
|
||||
if (size == 1 || size == 2 || size == 3 || size == 4 || size == 5 || size == 10)
|
||||
{
|
||||
Global.Config.TargetZoomFactor = size;
|
||||
Global.MainForm.FrameBufferResized();
|
||||
Global.OSD.AddMessage("Window size set to " + size.ToString() + "x");
|
||||
}
|
||||
else
|
||||
{
|
||||
console_log("Invalid window size");
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
console_log("Invalid window size");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void client_opencheats()
|
||||
{
|
||||
Global.MainForm.LoadCheatsWindow();
|
||||
|
|
|
@ -2372,7 +2372,7 @@ namespace BizHawk.MultiClient
|
|||
Global.DisplayManager.UpdateSource(Global.Emulator.VideoProvider);
|
||||
}
|
||||
|
||||
private void FrameBufferResized()
|
||||
public void FrameBufferResized()
|
||||
{
|
||||
var video = Global.Emulator.VideoProvider;
|
||||
int zoom = Global.Config.TargetZoomFactor;
|
||||
|
|
Loading…
Reference in New Issue