mirror of
https://github.com/MadeOfJelly/MushMachine.git
synced 2024-12-04 19:23:28 +01:00
direct sdl logging to spdlog
This commit is contained in:
parent
1d59003858
commit
fe8cdba254
@ -35,6 +35,16 @@ SDLService::SDLService(uint32_t sdl_init_flags) {
|
||||
|
||||
LOG_TRACE("constructing SDLService...");
|
||||
|
||||
SDL_LogSetOutputFunction(
|
||||
+[](void*, int category, SDL_LogPriority priority, const char* message) {
|
||||
spdlog::get("SDLService")->log(spdlog::level::level_enum(priority-1), "cat {}: {}", category, message);
|
||||
},
|
||||
nullptr
|
||||
);
|
||||
|
||||
SDL_LogSetAllPriority(SDL_LOG_PRIORITY_VERBOSE);
|
||||
|
||||
|
||||
//#ifdef __EMSCRIPTEN__
|
||||
//sdl_init_flags &= ~SDL_INIT_HAPTIC;
|
||||
//#endif
|
||||
|
Loading…
Reference in New Issue
Block a user