GUI: more mobile tweaks
This commit is contained in:
parent
ba9b96a2c8
commit
4a2cf7bc27
|
@ -2651,7 +2651,9 @@ int _processEvent(void* instance, SDL_Event* event) {
|
||||||
|
|
||||||
int FurnaceGUI::processEvent(SDL_Event* ev) {
|
int FurnaceGUI::processEvent(SDL_Event* ev) {
|
||||||
#ifdef IS_MOBILE
|
#ifdef IS_MOBILE
|
||||||
if (ev->type==SDL_APP_WILLENTERBACKGROUND) {
|
if (ev->type==SDL_APP_TERMINATING) {
|
||||||
|
// TODO: save last song state here
|
||||||
|
} else if (ev->type==SDL_APP_WILLENTERBACKGROUND) {
|
||||||
commitState();
|
commitState();
|
||||||
e->saveConf();
|
e->saveConf();
|
||||||
}
|
}
|
||||||
|
@ -2959,7 +2961,11 @@ bool FurnaceGUI::detectOutOfBoundsWindow() {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool FurnaceGUI::loop() {
|
bool FurnaceGUI::loop() {
|
||||||
|
#ifdef IS_MOBILE
|
||||||
|
bool doThreadedInput=true;
|
||||||
|
#else
|
||||||
bool doThreadedInput=!settings.noThreadedInput;
|
bool doThreadedInput=!settings.noThreadedInput;
|
||||||
|
#endif
|
||||||
if (doThreadedInput) {
|
if (doThreadedInput) {
|
||||||
logD("key input: event filter");
|
logD("key input: event filter");
|
||||||
SDL_SetEventFilter(_processEvent,this);
|
SDL_SetEventFilter(_processEvent,this);
|
||||||
|
|
|
@ -528,6 +528,7 @@ void FurnaceGUI::drawSettings() {
|
||||||
ImGui::SetTooltip("saves power by lowering the frame rate to 2fps when idle.\nmay cause issues under Mesa drivers!");
|
ImGui::SetTooltip("saves power by lowering the frame rate to 2fps when idle.\nmay cause issues under Mesa drivers!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef IS_MOBILE
|
||||||
bool noThreadedInputB=settings.noThreadedInput;
|
bool noThreadedInputB=settings.noThreadedInput;
|
||||||
if (ImGui::Checkbox("Disable threaded input (restart after changing!)",&noThreadedInputB)) {
|
if (ImGui::Checkbox("Disable threaded input (restart after changing!)",&noThreadedInputB)) {
|
||||||
settings.noThreadedInput=noThreadedInputB;
|
settings.noThreadedInput=noThreadedInputB;
|
||||||
|
@ -543,6 +544,7 @@ void FurnaceGUI::drawSettings() {
|
||||||
if (ImGui::IsItemHovered()) {
|
if (ImGui::IsItemHovered()) {
|
||||||
ImGui::SetTooltip("remembers the window's last position on startup.");
|
ImGui::SetTooltip("remembers the window's last position on startup.");
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
bool blankInsB=settings.blankIns;
|
bool blankInsB=settings.blankIns;
|
||||||
if (ImGui::Checkbox("New instruments are blank",&blankInsB)) {
|
if (ImGui::Checkbox("New instruments are blank",&blankInsB)) {
|
||||||
|
|
Loading…
Reference in a new issue