mirror of
https://github.com/libretro/RetroArch
synced 2025-04-18 14:42:30 +00:00
Merge branch 'master' of https://github.com/libretro/RetroArch
This commit is contained in:
commit
4f2398dd08
@ -143,12 +143,14 @@ static void frontend_win32_get_os(char *s, size_t len, int *major, int *minor)
|
|||||||
OSVERSIONINFOEX vi = {0};
|
OSVERSIONINFOEX vi = {0};
|
||||||
vi.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX);
|
vi.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX);
|
||||||
|
|
||||||
server = vi.wProductType != VER_NT_WORKSTATION;
|
|
||||||
|
|
||||||
serverR2 = GetSystemMetrics(SM_SERVERR2);
|
|
||||||
|
|
||||||
GetSystemInfo(&si);
|
GetSystemInfo(&si);
|
||||||
|
|
||||||
|
/* Available from NT 3.5 and Win95 */
|
||||||
|
GetVersionEx((OSVERSIONINFO*)&vi);
|
||||||
|
|
||||||
|
server = vi.wProductType != VER_NT_WORKSTATION;
|
||||||
|
serverR2 = GetSystemMetrics(SM_SERVERR2);
|
||||||
|
|
||||||
switch (si.wProcessorArchitecture)
|
switch (si.wProcessorArchitecture)
|
||||||
{
|
{
|
||||||
case PROCESSOR_ARCHITECTURE_AMD64:
|
case PROCESSOR_ARCHITECTURE_AMD64:
|
||||||
@ -166,10 +168,11 @@ static void frontend_win32_get_os(char *s, size_t len, int *major, int *minor)
|
|||||||
#else
|
#else
|
||||||
OSVERSIONINFO vi = {0};
|
OSVERSIONINFO vi = {0};
|
||||||
vi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
|
vi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Available from NT 3.5 and Win95 */
|
/* Available from NT 3.5 and Win95 */
|
||||||
GetVersionEx((OSVERSIONINFO*)&vi);
|
GetVersionEx(&vi);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
if (major)
|
if (major)
|
||||||
*major = vi.dwMajorVersion;
|
*major = vi.dwMajorVersion;
|
||||||
|
@ -681,7 +681,7 @@ static int menu_displaylist_parse_system_info(menu_displaylist_info_t *info)
|
|||||||
strlcpy(cpu_arch_str, "x86", sizeof(cpu_arch_str));
|
strlcpy(cpu_arch_str, "x86", sizeof(cpu_arch_str));
|
||||||
break;
|
break;
|
||||||
case FRONTEND_ARCH_X86_64:
|
case FRONTEND_ARCH_X86_64:
|
||||||
strlcpy(cpu_arch_str, "x86-64", sizeof(cpu_arch_str));
|
strlcpy(cpu_arch_str, "x64", sizeof(cpu_arch_str));
|
||||||
break;
|
break;
|
||||||
case FRONTEND_ARCH_PPC:
|
case FRONTEND_ARCH_PPC:
|
||||||
strlcpy(cpu_arch_str, "PPC", sizeof(cpu_arch_str));
|
strlcpy(cpu_arch_str, "PPC", sizeof(cpu_arch_str));
|
||||||
|
@ -60,6 +60,7 @@ const GUID GUID_NULL = {0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}};
|
|||||||
#include "../file_path_special.h"
|
#include "../file_path_special.h"
|
||||||
#include "../list_special.h"
|
#include "../list_special.h"
|
||||||
#include "../verbosity.h"
|
#include "../verbosity.h"
|
||||||
|
#include "../retroarch.h"
|
||||||
|
|
||||||
#include "tasks_internal.h"
|
#include "tasks_internal.h"
|
||||||
|
|
||||||
@ -591,9 +592,28 @@ found:
|
|||||||
|
|
||||||
if (hDeviceHandle == INVALID_HANDLE_VALUE)
|
if (hDeviceHandle == INVALID_HANDLE_VALUE)
|
||||||
{
|
{
|
||||||
RARCH_ERR("[Autoconf]: Can't open device: %d.", GetLastError());
|
/* Windows sometimes erroneously fails to open with a sharing violation:
|
||||||
|
* https://github.com/signal11/hidapi/issues/231
|
||||||
|
* If this happens, trying again with read + write usually works for some reason.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Open the device */
|
||||||
|
hDeviceHandle = CreateFileA(
|
||||||
|
devicePath,
|
||||||
|
GENERIC_READ | GENERIC_WRITE,
|
||||||
|
FILE_SHARE_READ | FILE_SHARE_WRITE,
|
||||||
|
NULL,
|
||||||
|
OPEN_EXISTING,
|
||||||
|
0, /*FILE_FLAG_OVERLAPPED,*/
|
||||||
|
NULL);
|
||||||
|
|
||||||
|
if (hDeviceHandle == INVALID_HANDLE_VALUE)
|
||||||
|
{
|
||||||
|
RARCH_ERR("[Autoconf]: Can't open device for reading and writing: %d.", GetLastError());
|
||||||
|
runloop_msg_queue_push("Bliss-Box already in use. Please make sure other programs are not using it.", 2, 300, false);
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
done:
|
done:
|
||||||
free(devicePath);
|
free(devicePath);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user