diff --git a/.github/workflows/steamrt4.yml b/.github/workflows/steamrt4.yml index 5519dbbd6..57002ba5f 100644 --- a/.github/workflows/steamrt4.yml +++ b/.github/workflows/steamrt4.yml @@ -75,5 +75,5 @@ jobs: overwrite: true name: steamrt4_steampipe_depot path: ${{runner.workspace}}/install/* - retention-days: 1 + retention-days: 60 compression-level: 9 diff --git a/Source/Steam/CMakeLists.txt b/Source/Steam/CMakeLists.txt index 63309c460..eae1358d2 100644 --- a/Source/Steam/CMakeLists.txt +++ b/Source/Steam/CMakeLists.txt @@ -31,3 +31,6 @@ install(FILES emulator.json install(FILES ConfigTemplate.json DESTINATION / COMPONENT Runtime) +install(FILES toolmanifest.vdf + DESTINATION / + COMPONENT Runtime) diff --git a/Source/Steam/ServerManager.cpp b/Source/Steam/ServerManager.cpp index 9d67d42d9..c6a5b94b0 100644 --- a/Source/Steam/ServerManager.cpp +++ b/Source/Steam/ServerManager.cpp @@ -3,6 +3,7 @@ #include "Common/FEXServerClient.h" #include +#include #include #include @@ -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; } } diff --git a/Source/Steam/toolmanifest.vdf b/Source/Steam/toolmanifest.vdf new file mode 100644 index 000000000..f6e6dc956 --- /dev/null +++ b/Source/Steam/toolmanifest.vdf @@ -0,0 +1,8 @@ +"manifest" +{ + "commandline" "/FEXCompatTool %verb%" + "filter_exclusive_priority" "2" + "version" "2" + "use_tool_subprocess_reaper" "1" + "compatmanager_layer_name" "fex" +}