Display fix for MacOS x86
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using QemuVmManager.Models;
|
||||
using System.Diagnostics;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace QemuVmManager.Core;
|
||||
|
||||
@@ -230,7 +231,19 @@ public class QemuCommandBuilder
|
||||
var display = _config.Display;
|
||||
|
||||
_arguments.Add("-display");
|
||||
_arguments.Add(display.Type);
|
||||
|
||||
// Use appropriate display backend based on OS
|
||||
string displayType = display.Type;
|
||||
if (OperatingSystem.IsMacOS())
|
||||
{
|
||||
// On macOS, GTK is not available, use cocoa instead
|
||||
if (displayType == "gtk")
|
||||
{
|
||||
displayType = "cocoa";
|
||||
}
|
||||
}
|
||||
|
||||
_arguments.Add(displayType);
|
||||
|
||||
_arguments.Add("-vga");
|
||||
_arguments.Add(display.Vga);
|
||||
|
Reference in New Issue
Block a user