mirror of
https://github.com/vcmi/vcmi.git
synced 2025-04-27 12:22:45 +02:00
Capture SDL log
* just a stub for now
This commit is contained in:
parent
cc669b0ae7
commit
f58148cd94
@ -180,6 +180,18 @@ static void prog_help(const po::options_description &opts)
|
|||||||
// printf(" -v, --version display version information and exit\n");
|
// printf(" -v, --version display version information and exit\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void SDLLogCallback(void* userdata,
|
||||||
|
int category,
|
||||||
|
SDL_LogPriority priority,
|
||||||
|
const char* message)
|
||||||
|
{
|
||||||
|
//todo: convert SDL log priority to vcmi log priority
|
||||||
|
//todo: make separate log domain for SDL
|
||||||
|
|
||||||
|
logGlobal->debugStream() << "SDL(category " << category << "; priority " <<priority <<") "<<message;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
#ifdef VCMI_APPLE
|
#ifdef VCMI_APPLE
|
||||||
void OSX_checkForUpdates();
|
void OSX_checkForUpdates();
|
||||||
#endif
|
#endif
|
||||||
@ -339,6 +351,8 @@ int main(int argc, char** argv)
|
|||||||
GH.mainFPSmng->init(); //(!)init here AFTER SDL_Init() while using SDL for FPS management
|
GH.mainFPSmng->init(); //(!)init here AFTER SDL_Init() while using SDL for FPS management
|
||||||
atexit(SDL_Quit);
|
atexit(SDL_Quit);
|
||||||
|
|
||||||
|
SDL_LogSetOutputFunction(&SDLLogCallback, nullptr);
|
||||||
|
|
||||||
int driversCount = SDL_GetNumRenderDrivers();
|
int driversCount = SDL_GetNumRenderDrivers();
|
||||||
std::string preferredDriverName = video["driver"].String();
|
std::string preferredDriverName = video["driver"].String();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user