ref: da71b1fbb21ab3a4a7d0629f5c597ee03eff6227
parent: 3f8cfa6c11532602d6f3972ef676866ea25981a7
author: laamaa <jonne.kokkonen@gmail.com>
date: Wed Apr 23 08:27:02 EDT 2025
linux fixes
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -25,8 +25,11 @@
add_executable(${APP_NAME} ${m8c_SRC})endif ()
-find_package(PkgConfig REQUIRED pkgconfig)
-pkg_check_modules(SDL3 REQUIRED SDL3)
+find_package(PkgConfig REQUIRED)
+find_package(SDL3 REQUIRED CONFIG REQUIRED COMPONENTS SDL3)
+
+pkg_check_modules(SDL3 REQUIRED sdl3)
+
target_link_options(${APP_NAME} PRIVATE ${SDL3_LDFLAGS}) target_include_directories(${APP_NAME} PRIVATE ${SDL3_INCLUDE_DIRS}) target_compile_options(${APP_NAME} PRIVATE ${SDL3_CFLAGS_OTHER})--- a/src/gamepads.c
+++ b/src/gamepads.c
@@ -59,7 +59,6 @@
} else {SDL_LogError(SDL_LOG_CATEGORY_INPUT, "Error loading game controller mappings.");
}
- SDL_CloseIO(db_rw);
} else {SDL_LogError(SDL_LOG_CATEGORY_INPUT, "Unable to open game controller database file.");
}
--- a/src/main.c
+++ b/src/main.c
@@ -6,7 +6,6 @@
// #define DEBUG_MSG
#include <SDL3/SDL.h>
-#include <SDL3/SDL_init.h>
#define SDL_MAIN_USE_CALLBACKS
#include <SDL3/SDL_main.h>
#include <stdlib.h>
--- a/src/render.c
+++ b/src/render.c
@@ -377,6 +377,7 @@
if (screensaver_initialized) {return 1;
}
+ SDL_SetRenderTarget(rend,main_texture);
renderer_set_font_mode(1);
global_background_color.r = 0, global_background_color.g = 0, global_background_color.b = 0;
fx_cube_init(rend, (SDL_Color){255, 255, 255, 255}, texture_width, texture_height,--
⑨