[melonDS] allow dialogs without a parent window.

This commit is contained in:
StapleButter 2017-10-02 23:26:25 +02:00 committed by Mike Sinkovsky
parent ac495d0e12
commit 5d5cb6eb08
2 changed files with 2 additions and 2 deletions

View File

@ -4,7 +4,7 @@
// LONGTERM figure out why, and describe, that this is the desired behavior
// LONGTERM also point out that font and color buttons also work like this
#define windowWindow(w) (GTK_WINDOW(uiControlHandle(uiControl(w))))
#define windowWindow(w) ((w)?(GTK_WINDOW(uiControlHandle(uiControl(w)))):NULL)
static char *filedialog(GtkWindow *parent, GtkFileChooserAction mode, const gchar *confirm)
{

View File

@ -14,7 +14,7 @@
// - when a dialog is active, tab navigation in other windows stops working
// - when adding uiOpenFolder(), use IFileDialog as well - https://msdn.microsoft.com/en-us/library/windows/desktop/bb762115%28v=vs.85%29.aspx
#define windowHWND(w) ((HWND) uiControlHandle(uiControl(w)))
#define windowHWND(w) (w ? (HWND) uiControlHandle(uiControl(w)) : NULL)
char *commonItemDialog(HWND parent, REFCLSID clsid, REFIID iid, FILEOPENDIALOGOPTIONS optsadd)
{