Merge branch 'master' of https://bitbucket.org/4coder/4coder
This commit is contained in:
commit
94b8b70472
|
@ -89,7 +89,7 @@
|
||||||
|
|
||||||
#define LINUX_FN_DEBUG(fmt, ...) do { \
|
#define LINUX_FN_DEBUG(fmt, ...) do { \
|
||||||
LOGF("%s: " fmt "\n", __func__, ##__VA_ARGS__); \
|
LOGF("%s: " fmt "\n", __func__, ##__VA_ARGS__); \
|
||||||
} while(0)
|
} while (0)
|
||||||
|
|
||||||
#define InterlockedCompareExchange(dest, ex, comp) \
|
#define InterlockedCompareExchange(dest, ex, comp) \
|
||||||
__sync_val_compare_and_swap((dest), (comp), (ex))
|
__sync_val_compare_and_swap((dest), (comp), (ex))
|
||||||
|
@ -470,7 +470,7 @@ Sys_CLI_Update_Step_Sig(system_cli_update_step){
|
||||||
size_t space_left = max;
|
size_t space_left = max;
|
||||||
char* ptr = dest;
|
char* ptr = dest;
|
||||||
|
|
||||||
while(space_left > 0 && select(pipe_read_fd + 1, &fds, NULL, NULL, &tv) == 1){
|
while (space_left > 0 && select(pipe_read_fd + 1, &fds, NULL, NULL, &tv) == 1){
|
||||||
ssize_t num = read(pipe_read_fd, ptr, space_left);
|
ssize_t num = read(pipe_read_fd, ptr, space_left);
|
||||||
if (num == -1){
|
if (num == -1){
|
||||||
perror("system_cli_update_step: read");
|
perror("system_cli_update_step: read");
|
||||||
|
@ -1505,14 +1505,13 @@ LinuxX11WindowInit(int argc, char** argv, int* window_width, int* window_height)
|
||||||
linux_maximize_window(true);
|
linux_maximize_window(true);
|
||||||
}
|
}
|
||||||
else if (plat_settings.fullscreen_window){
|
else if (plat_settings.fullscreen_window){
|
||||||
system_toggle_fullscreen();
|
linux_toggle_fullscreen();
|
||||||
}
|
}
|
||||||
|
|
||||||
XSync(linuxvars.XDisplay, False);
|
XSync(linuxvars.XDisplay, False);
|
||||||
|
|
||||||
XWindowAttributes WinAttribs;
|
XWindowAttributes WinAttribs;
|
||||||
if (XGetWindowAttributes(linuxvars.XDisplay, linuxvars.XWindow, &WinAttribs))
|
if (XGetWindowAttributes(linuxvars.XDisplay, linuxvars.XWindow, &WinAttribs)){
|
||||||
{
|
|
||||||
*window_width = WinAttribs.width;
|
*window_width = WinAttribs.width;
|
||||||
*window_height = WinAttribs.height;
|
*window_height = WinAttribs.height;
|
||||||
}
|
}
|
||||||
|
@ -1533,7 +1532,7 @@ LinuxHandleX11Events(void)
|
||||||
static XEvent PrevEvent = {};
|
static XEvent PrevEvent = {};
|
||||||
b32 should_step = 0;
|
b32 should_step = 0;
|
||||||
|
|
||||||
while(XPending(linuxvars.XDisplay))
|
while (XPending(linuxvars.XDisplay))
|
||||||
{
|
{
|
||||||
XEvent Event;
|
XEvent Event;
|
||||||
XNextEvent(linuxvars.XDisplay, &Event);
|
XNextEvent(linuxvars.XDisplay, &Event);
|
||||||
|
@ -2160,7 +2159,7 @@ main(int argc, char **argv){
|
||||||
int ret;
|
int ret;
|
||||||
do {
|
do {
|
||||||
ret = read(linuxvars.step_event_fd, &ev, 8);
|
ret = read(linuxvars.step_event_fd, &ev, 8);
|
||||||
} while(ret != -1 || errno != EAGAIN);
|
} while (ret != -1 || errno != EAGAIN);
|
||||||
do_step = 1;
|
do_step = 1;
|
||||||
} break;
|
} break;
|
||||||
|
|
||||||
|
@ -2169,7 +2168,7 @@ main(int argc, char **argv){
|
||||||
int ret;
|
int ret;
|
||||||
do {
|
do {
|
||||||
ret = read(linuxvars.step_timer_fd, &count, 8);
|
ret = read(linuxvars.step_timer_fd, &count, 8);
|
||||||
} while(ret != -1 || errno != EAGAIN);
|
} while (ret != -1 || errno != EAGAIN);
|
||||||
do_step = 1;
|
do_step = 1;
|
||||||
} break;
|
} break;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue