Create win32_drag_query_file
This commit is contained in:
parent
b7bf13ed1c
commit
45d6b4a228
|
@ -212,26 +212,8 @@ void win32_monitor_info(void *data, void *hm_data, unsigned *mon_id)
|
||||||
GetMonitorInfo(*hm_to_use, (MONITORINFO*)mon);
|
GetMonitorInfo(*hm_to_use, (MONITORINFO*)mon);
|
||||||
}
|
}
|
||||||
|
|
||||||
static LRESULT CALLBACK WndProcCommon(bool *quit, HWND hwnd, UINT message,
|
|
||||||
WPARAM wparam, LPARAM lparam)
|
|
||||||
{
|
|
||||||
settings_t *settings = config_get_ptr();
|
|
||||||
|
|
||||||
switch (message)
|
|
||||||
{
|
|
||||||
case WM_SYSCOMMAND:
|
|
||||||
/* Prevent screensavers, etc, while running. */
|
|
||||||
switch (wparam)
|
|
||||||
{
|
|
||||||
case SC_SCREENSAVE:
|
|
||||||
case SC_MONITORPOWER:
|
|
||||||
*quit = true;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case WM_DROPFILES:
|
|
||||||
/* Get the count of the files dropped */
|
/* Get the count of the files dropped */
|
||||||
|
static int win32_drag_query_file(HWND hwnd, WPARAM wparam)
|
||||||
{
|
{
|
||||||
char szFilename[1024] = {0};
|
char szFilename[1024] = {0};
|
||||||
|
|
||||||
|
@ -260,7 +242,10 @@ static LRESULT CALLBACK WndProcCommon(bool *quit, HWND hwnd, UINT message,
|
||||||
for (i = 0; i < list_size; i++)
|
for (i = 0; i < list_size; i++)
|
||||||
{
|
{
|
||||||
const core_info_t *info = (const core_info_t*)&core_info[i];
|
const core_info_t *info = (const core_info_t*)&core_info[i];
|
||||||
if(strcmp(info->systemname,current_core->systemname))break;
|
|
||||||
|
if(strcmp(info->systemname, current_core->systemname))
|
||||||
|
break;
|
||||||
|
|
||||||
if(!strcmp(settings->path.libretro,info->path))
|
if(!strcmp(settings->path.libretro,info->path))
|
||||||
{
|
{
|
||||||
/* Our previous core supports the current rom */
|
/* Our previous core supports the current rom */
|
||||||
|
@ -275,11 +260,8 @@ static LRESULT CALLBACK WndProcCommon(bool *quit, HWND hwnd, UINT message,
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
goto load_fail;
|
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
load_fail:
|
|
||||||
/* Poll for cores for current rom since none exist. */
|
/* Poll for cores for current rom since none exist. */
|
||||||
if(list_size ==1)
|
if(list_size ==1)
|
||||||
{
|
{
|
||||||
|
@ -310,11 +292,31 @@ load_fail:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
DragFinish((HDROP)wparam);
|
DragFinish((HDROP)wparam);
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
static LRESULT CALLBACK WndProcCommon(bool *quit, HWND hwnd, UINT message,
|
||||||
|
WPARAM wparam, LPARAM lparam)
|
||||||
|
{
|
||||||
|
settings_t *settings = config_get_ptr();
|
||||||
|
|
||||||
|
switch (message)
|
||||||
|
{
|
||||||
|
case WM_SYSCOMMAND:
|
||||||
|
/* Prevent screensavers, etc, while running. */
|
||||||
|
switch (wparam)
|
||||||
|
{
|
||||||
|
case SC_SCREENSAVE:
|
||||||
|
case SC_MONITORPOWER:
|
||||||
|
*quit = true;
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case WM_DROPFILES:
|
||||||
|
return win32_drag_query_file(hwnd, wparam);
|
||||||
case WM_CHAR:
|
case WM_CHAR:
|
||||||
case WM_KEYDOWN:
|
case WM_KEYDOWN:
|
||||||
case WM_KEYUP:
|
case WM_KEYUP:
|
||||||
|
|
Loading…
Reference in New Issue