From fe7271f1e11c000de2176e515df3a9a27d6e5965 Mon Sep 17 00:00:00 2001 From: Josh Harris Date: Fri, 17 Oct 2025 23:47:38 +0100 Subject: [PATCH 1/3] Added line to PureDOOM header which removes the error prone tzp variable from gettimeofday for linux --- include/PureDOOM.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/PureDOOM.h b/include/PureDOOM.h index 4ef4547..3d6c0cb 100644 --- a/include/PureDOOM.h +++ b/include/PureDOOM.h @@ -7140,8 +7140,14 @@ void doom_gettime_impl(int* sec, int* usec) *usec = (int)(system_time.wMilliseconds * 1000); #else struct timeval tp; + +#ifdef __linux__ + gettimeofday(&tp, NULL); +#else struct timezone tzp; gettimeofday(&tp, &tzp); +#endif + *sec = tp.tv_sec; *usec = tp.tv_usec; #endif From ebd9b44348fa8e2e44563d7df2f47f2b75585ca8 Mon Sep 17 00:00:00 2001 From: Josh Harris Date: Fri, 17 Oct 2025 23:52:59 +0100 Subject: [PATCH 2/3] Added define in linux specific code which stops the redefinition of timespec and timeval when including asoundlib.h --- rgfw_example.c | 1 + 1 file changed, 1 insertion(+) diff --git a/rgfw_example.c b/rgfw_example.c index e47c68b..f1f7f52 100644 --- a/rgfw_example.c +++ b/rgfw_example.c @@ -207,6 +207,7 @@ void send_midi_msg(uint32_t midi_msg) } } #elif defined(__linux__) +#define _POSIX_C_SOURCE #include static snd_rawmidi_t* midi_out_handle = NULL; From 84f04eb086a9b2a67afc081b99f4d3c6e9afb585 Mon Sep 17 00:00:00 2001 From: Josh Harris Date: Sat, 18 Oct 2025 01:55:50 +0100 Subject: [PATCH 3/3] Changed linux workflow to download alsa sound --- .github/workflows/linux.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index a5fbb79..5b124dd 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -16,6 +16,6 @@ jobs: - name: apt-update run: sudo apt-get update - name: apt - run: sudo apt-get install mesa-common-dev libxi-dev libglx-dev libxcursor-dev libxrandr-dev + run: sudo apt-get install mesa-common-dev libxi-dev libglx-dev libxcursor-dev libxrandr-dev libasound2-dev - name: make run: make