mirror of
https://github.com/FEX-Emu/FEX.git
synced 2026-10-28 17:00:54 +01:00
Merge pull request #5108 from Sonicadvance1/20
github/steamrt4: Additional comments
This commit is contained in:
4 files changed
+26
-15
No files matched your search
@@ -75,5 +75,5 @@ jobs:
|
||||
overwrite: true
|
||||
name: steamrt4_steampipe_depot
|
||||
path: ${{runner.workspace}}/install/*
|
||||
retention-days: 1
|
||||
retention-days: 60
|
||||
compression-level: 9
|
||||
@@ -31,3 +31,6 @@ install(FILES emulator.json
|
||||
install(FILES ConfigTemplate.json
|
||||
DESTINATION /
|
||||
COMPONENT Runtime)
|
||||
install(FILES toolmanifest.vdf
|
||||
DESTINATION /
|
||||
COMPONENT Runtime)
|
||||
@@ -3,6 +3,7 @@
|
||||
#include "Common/FEXServerClient.h"
|
||||
|
||||
#include <cstdio>
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
#include <poll.h>
|
||||
|
||||
@@ -87,21 +88,20 @@ int main(int argc, const char** argv, char** const envp) {
|
||||
close(ServerFD);
|
||||
ServerFD = -1;
|
||||
|
||||
// stdin will be a pipe, so wait until that FD is closed.
|
||||
// Do a blocking read, discarding any written data and wait for EOF.
|
||||
while (true) {
|
||||
pollfd p {
|
||||
.fd = STDIN_FILENO,
|
||||
.events = POLLRDHUP,
|
||||
.revents = 0,
|
||||
};
|
||||
|
||||
int events = poll(&p, 1, -1);
|
||||
if (events == -1 && errno == EINTR) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (events > 0 && (p.revents & (POLLRDHUP | POLLERR | POLLHUP | POLLNVAL))) {
|
||||
// Error or pressure-vessel hung-up.
|
||||
char buf[4096];
|
||||
auto read_len = ::read(STDIN_FILENO, buf, sizeof(buf));
|
||||
if (read_len < 0) {
|
||||
if (errno == EINTR || errno == EAGAIN) {
|
||||
// Interrupted, try again.
|
||||
continue;
|
||||
} else {
|
||||
// Error on read.
|
||||
break;
|
||||
}
|
||||
} else if (read_len == 0) {
|
||||
// EOF
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
"manifest"
|
||||
{
|
||||
"commandline" "/FEXCompatTool %verb%"
|
||||
"filter_exclusive_priority" "2"
|
||||
"version" "2"
|
||||
"use_tool_subprocess_reaper" "1"
|
||||
"compatmanager_layer_name" "fex"
|
||||
}
|
||||
Reference in new issue
Block a user