Fix indentation in i18n.cpp, remove unused havePendingTitle, output when writing to pipe fails

This commit is contained in:
KockaAdmiralac 2018-06-16 09:21:53 +02:00
parent 3a6e61604b
commit 8060adceee
No known key found for this signature in database
GPG key ID: A6007A5107D8CFBD
4 changed files with 63 additions and 62 deletions

View file

@ -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;

View file

@ -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
}

View file

@ -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;
}