mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-05 04:28:47 +02:00
Examples: SDL: Gamepad support minor amend. Fixes ImGuiBackendFlags_HasGamepad not being set. Enable in Emscripten demo. Tweaks. (#2509, #2484).
This commit is contained in:
@ -25,7 +25,7 @@ void main_loop(void*);
|
||||
int main(int, char**)
|
||||
{
|
||||
// Setup SDL
|
||||
if (SDL_Init(SDL_INIT_VIDEO|SDL_INIT_TIMER) != 0)
|
||||
if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_TIMER | SDL_INIT_GAMECONTROLLER) != 0)
|
||||
{
|
||||
printf("Error: %s\n", SDL_GetError());
|
||||
return -1;
|
||||
@ -62,6 +62,7 @@ int main(int, char**)
|
||||
ImGui::CreateContext();
|
||||
ImGuiIO& io = ImGui::GetIO(); (void)io;
|
||||
//io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard; // Enable Keyboard Controls
|
||||
//io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad; // Enable Gamepad Controls
|
||||
|
||||
// For an Emscripten build we are disabling file-system access, so let's not attempt to do a fopen() of the imgui.ini file.
|
||||
// You may manually call LoadIniSettingsFromMemory() to load settings from your own storage.
|
||||
|
Reference in New Issue
Block a user