mirror of
https://github.com/libretro/RetroArch
synced 2025-04-09 21:45:45 +00:00
Fix for issue #1365
This commit is contained in:
parent
624dc5d59c
commit
5e7295d87f
12
command.c
12
command.c
@ -1,7 +1,7 @@
|
|||||||
/* RetroArch - A frontend for libretro.
|
/* RetroArch - A frontend for libretro.
|
||||||
* Copyright (C) 2010-2014 - Hans-Kristian Arntzen
|
* Copyright (C) 2010-2014 - Hans-Kristian Arntzen
|
||||||
* Copyright (C) 2011-2015 - Daniel De Matteis
|
* Copyright (C) 2011-2015 - Daniel De Matteis
|
||||||
*
|
*
|
||||||
* RetroArch is free software: you can redistribute it and/or modify it under the terms
|
* RetroArch is free software: you can redistribute it and/or modify it under the terms
|
||||||
* of the GNU General Public License as published by the Free Software Found-
|
* of the GNU General Public License as published by the Free Software Found-
|
||||||
* ation, either version 3 of the License, or (at your option) any later version.
|
* ation, either version 3 of the License, or (at your option) any later version.
|
||||||
@ -109,8 +109,10 @@ error:
|
|||||||
static bool cmd_init_stdin(rarch_cmd_t *handle)
|
static bool cmd_init_stdin(rarch_cmd_t *handle)
|
||||||
{
|
{
|
||||||
#ifndef _WIN32
|
#ifndef _WIN32
|
||||||
|
#ifdef HAVE_NETPLAY
|
||||||
if (!socket_nonblock(STDIN_FILENO))
|
if (!socket_nonblock(STDIN_FILENO))
|
||||||
return false;
|
return false;
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
handle->stdin_enable = true;
|
handle->stdin_enable = true;
|
||||||
@ -200,7 +202,7 @@ static const struct cmd_map map[] = {
|
|||||||
{ "OVERLAY_NEXT", RARCH_OVERLAY_NEXT },
|
{ "OVERLAY_NEXT", RARCH_OVERLAY_NEXT },
|
||||||
{ "DISK_EJECT_TOGGLE", RARCH_DISK_EJECT_TOGGLE },
|
{ "DISK_EJECT_TOGGLE", RARCH_DISK_EJECT_TOGGLE },
|
||||||
{ "DISK_NEXT", RARCH_DISK_NEXT },
|
{ "DISK_NEXT", RARCH_DISK_NEXT },
|
||||||
{ "DISK_PREV", RARCH_DISK_PREV },
|
{ "DISK_PREV", RARCH_DISK_PREV },
|
||||||
{ "GRAB_MOUSE_TOGGLE", RARCH_GRAB_MOUSE_TOGGLE },
|
{ "GRAB_MOUSE_TOGGLE", RARCH_GRAB_MOUSE_TOGGLE },
|
||||||
{ "MENU_TOGGLE", RARCH_MENU_TOGGLE },
|
{ "MENU_TOGGLE", RARCH_MENU_TOGGLE },
|
||||||
{ "MENU_UP", RETRO_DEVICE_ID_JOYPAD_UP },
|
{ "MENU_UP", RETRO_DEVICE_ID_JOYPAD_UP },
|
||||||
@ -484,7 +486,7 @@ static void stdin_cmd_poll(rarch_cmd_t *handle)
|
|||||||
|
|
||||||
if (!last_newline)
|
if (!last_newline)
|
||||||
{
|
{
|
||||||
/* We're receiving bogus data in pipe
|
/* We're receiving bogus data in pipe
|
||||||
* (no terminating newline), flush out the buffer. */
|
* (no terminating newline), flush out the buffer. */
|
||||||
if (handle->stdin_buf_ptr + 1 >= STDIN_BUF_SIZE)
|
if (handle->stdin_buf_ptr + 1 >= STDIN_BUF_SIZE)
|
||||||
{
|
{
|
||||||
@ -528,7 +530,7 @@ static bool send_udp_packet(const char *host,
|
|||||||
const struct addrinfo *tmp = NULL;
|
const struct addrinfo *tmp = NULL;
|
||||||
int fd = -1;
|
int fd = -1;
|
||||||
bool ret = true;
|
bool ret = true;
|
||||||
|
|
||||||
memset(&hints, 0, sizeof(hints));
|
memset(&hints, 0, sizeof(hints));
|
||||||
#if defined(_WIN32) || defined(HAVE_SOCKET_LEGACY)
|
#if defined(_WIN32) || defined(HAVE_SOCKET_LEGACY)
|
||||||
hints.ai_family = AF_INET;
|
hints.ai_family = AF_INET;
|
||||||
@ -640,5 +642,3 @@ bool network_cmd_send(const char *cmd_)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user