mirror of
https://forgejo.xatacraft.ru/Sunshine/mkxp-sunshine.git
synced 2026-08-19 13:29:54 +00:00
Fix indentation in i18n.cpp, remove unused havePendingTitle, output when writing to pipe fails
This commit is contained in:
parent
3a6e61604b
commit
8060adceee
4 changed files with 63 additions and 62 deletions
|
|
@ -48,13 +48,19 @@ int server_thread(void *data)
|
|||
}
|
||||
CloseHandle(pipe);
|
||||
#else
|
||||
if (FILE *file = fopen(PIPE_PATH, "r")) {
|
||||
if (FILE *file = fopen(PIPE_PATH, "r"))
|
||||
{
|
||||
fclose(file);
|
||||
out_pipe = open(PIPE_PATH, O_WRONLY | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH);
|
||||
SDL_LockMutex(mutex);
|
||||
active = true;
|
||||
if (message_len > 0)
|
||||
write(out_pipe, (char*)message_buffer, message_len);
|
||||
{
|
||||
if (write(out_pipe, (char*)message_buffer, message_len) == -1)
|
||||
{
|
||||
Debug() << "Failure writing to journal's pipe!";
|
||||
}
|
||||
}
|
||||
SDL_UnlockMutex(mutex);
|
||||
}
|
||||
return 0;
|
||||
|
|
|
|||
2
mkxp.pro
2
mkxp.pro
|
|
@ -48,7 +48,7 @@ unix {
|
|||
}
|
||||
!macx: {
|
||||
QMAKE_CXXFLAGS += -g
|
||||
PKGCONFIG += giomm-2.4 gtk+-3.0 gdk-3.0 libxfconf-0
|
||||
PKGCONFIG += gtk+-3.0 gdk-3.0 libxfconf-0
|
||||
INCLUDEPATH += /usr/include/AL /usr/local/include/AL
|
||||
LIBS += -lX11
|
||||
}
|
||||
|
|
|
|||
|
|
@ -166,7 +166,6 @@ void EventThread::process(RGSSThreadData &rtData)
|
|||
char buffer[128];
|
||||
|
||||
char pendingTitle[128];
|
||||
bool havePendingTitle = false;
|
||||
|
||||
bool resetting = false;
|
||||
|
||||
|
|
@ -330,8 +329,6 @@ void EventThread::process(RGSSThreadData &rtData)
|
|||
/* Prevent fullscreen flicker */
|
||||
strncpy(pendingTitle, rtData.config.windowTitle.c_str(),
|
||||
sizeof(pendingTitle));
|
||||
havePendingTitle = true;
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
@ -510,8 +507,6 @@ void EventThread::process(RGSSThreadData &rtData)
|
|||
if (fullscreen)
|
||||
{
|
||||
strncpy(pendingTitle, buffer, sizeof(pendingTitle));
|
||||
havePendingTitle = true;
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue