mirror of
https://github.com/cimgui/cimgui.git
synced 2025-08-10 20:08:31 +01:00
backend_test: make mingw with SDL have console output
This commit is contained in:
@@ -76,5 +76,8 @@ target_link_libraries(cimgui_sdl ${IMGUI_LIBRARIES} ${IMGUI_SDL_LIBRARY})
|
||||
#using library
|
||||
include_directories(../generator/output/)
|
||||
add_executable(test_sdl main.c)
|
||||
if (MINGW)
|
||||
target_link_options(test_sdl PRIVATE "-mconsole")
|
||||
endif()
|
||||
target_link_libraries(test_sdl ${IMGUI_SDL_LIBRARY} cimgui_sdl)
|
||||
|
||||
|
@@ -17,7 +17,7 @@ SDL_Window *window = NULL;
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
|
||||
|
||||
if (SDL_Init(SDL_INIT_VIDEO) < 0) {
|
||||
SDL_Log("failed to init: %s", SDL_GetError());
|
||||
return -1;
|
||||
@@ -69,7 +69,7 @@ int main(int argc, char* argv[])
|
||||
}
|
||||
|
||||
// check opengl version sdl uses
|
||||
//SDL_Log("opengl version: %s", (char*)glGetString(GL_VERSION));
|
||||
SDL_Log("opengl version: %s", (char*)glGetString(GL_VERSION));
|
||||
|
||||
// setup imgui
|
||||
igCreateContext(NULL);
|
||||
|
Reference in New Issue
Block a user