Nullable implicit cast fix
This commit is contained in:
@@ -1222,11 +1222,11 @@ GPUDevice* GPUDeviceVulkan::Create()
|
||||
return nullptr;
|
||||
}
|
||||
uint32 vendorId = 0;
|
||||
if (CommandLine::Options.NVIDIA)
|
||||
if (CommandLine::Options.NVIDIA.IsTrue())
|
||||
vendorId = GPU_VENDOR_ID_NVIDIA;
|
||||
else if (CommandLine::Options.AMD)
|
||||
else if (CommandLine::Options.AMD.IsTrue())
|
||||
vendorId = GPU_VENDOR_ID_AMD;
|
||||
else if (CommandLine::Options.Intel)
|
||||
else if (CommandLine::Options.Intel.IsTrue())
|
||||
vendorId = GPU_VENDOR_ID_INTEL;
|
||||
if (vendorId != 0)
|
||||
{
|
||||
|
||||
@@ -653,7 +653,7 @@ static int X11_MessageBoxLoop(MessageBoxData* data)
|
||||
|
||||
DialogResult MessageBox::Show(Window* parent, const StringView& text, const StringView& caption, MessageBoxButtons buttons, MessageBoxIcon icon)
|
||||
{
|
||||
if (CommandLine::Options.Headless)
|
||||
if (CommandLine::Options.Headless.IsTrue())
|
||||
return DialogResult::None;
|
||||
|
||||
// Setup for simple popup
|
||||
@@ -1369,7 +1369,7 @@ public:
|
||||
|
||||
DragDropEffect LinuxWindow::DoDragDrop(const StringView& data)
|
||||
{
|
||||
if (CommandLine::Options.Headless)
|
||||
if (CommandLine::Options.Headless.IsTrue())
|
||||
return DragDropEffect::None;
|
||||
auto cursorWrong = X11::XCreateFontCursor(xDisplay, 54);
|
||||
auto cursorTransient = X11::XCreateFontCursor(xDisplay, 24);
|
||||
@@ -1673,7 +1673,7 @@ void LinuxClipboard::Clear()
|
||||
|
||||
void LinuxClipboard::SetText(const StringView& text)
|
||||
{
|
||||
if (CommandLine::Options.Headless)
|
||||
if (CommandLine::Options.Headless.IsTrue())
|
||||
return;
|
||||
auto mainWindow = (LinuxWindow*)Engine::MainWindow;
|
||||
if (!mainWindow)
|
||||
@@ -1695,7 +1695,7 @@ void LinuxClipboard::SetFiles(const Array<String>& files)
|
||||
|
||||
String LinuxClipboard::GetText()
|
||||
{
|
||||
if (CommandLine::Options.Headless)
|
||||
if (CommandLine::Options.Headless.IsTrue())
|
||||
return String::Empty;
|
||||
String result;
|
||||
auto mainWindow = (LinuxWindow*)Engine::MainWindow;
|
||||
@@ -2118,7 +2118,7 @@ bool LinuxPlatform::Init()
|
||||
Platform::MemoryClear(CursorsImg, sizeof(CursorsImg));
|
||||
|
||||
// Skip setup if running in headless mode (X11 might not be available on servers)
|
||||
if (CommandLine::Options.Headless)
|
||||
if (CommandLine::Options.Headless.IsTrue())
|
||||
return false;
|
||||
|
||||
X11::XInitThreads();
|
||||
|
||||
@@ -54,7 +54,7 @@ String ComputerName;
|
||||
|
||||
DialogResult MessageBox::Show(Window* parent, const StringView& text, const StringView& caption, MessageBoxButtons buttons, MessageBoxIcon icon)
|
||||
{
|
||||
if (CommandLine::Options.Headless)
|
||||
if (CommandLine::Options.Headless.IsTrue())
|
||||
return DialogResult::None;
|
||||
NSAlert* alert = [[NSAlert alloc] init];
|
||||
ASSERT(alert);
|
||||
|
||||
Reference in New Issue
Block a user