Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Even more sigint-related fixes #78794

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/input_popup.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include "input_popup.h"

#include "cata_utility.h"
#include "game.h"
#include "imgui/imgui.h"
#include "imgui/imgui_internal.h"
#include "imgui/imgui_stdlib.h"
Expand Down Expand Up @@ -385,7 +386,7 @@ T number_input_popup<T>::query()

if( action == "TEXT.CONFIRM" ) {
return value;
} else if( action == "TEXT.QUIT" ) {
} else if( are_we_quitting() || action == "TEXT.QUIT" ) {
break;
}

Expand Down
3 changes: 2 additions & 1 deletion src/newcharacter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#include "color.h"
#include "cursesdef.h"
#include "enum_conversions.h"
#include "game.h"
#include "game_constants.h"
#include "input_context.h"
#include "inventory.h"
Expand Down Expand Up @@ -160,7 +161,7 @@ void tab_manager::draw( const catacurses::window &w )

bool tab_manager::handle_input( const std::string &action, const input_context &ctxt )
{
if( action == "QUIT" && query_yn( _( "Return to main menu?" ) ) ) {
if( are_we_quitting() || ( action == "QUIT" && query_yn( _( "Return to main menu?" ) ) ) ) {
quit = true;
} else if( action == "PREV_TAB" ) {
position.prev();
Expand Down
2 changes: 1 addition & 1 deletion src/options.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3913,7 +3913,7 @@ std::string options_manager::show( bool ingame, const bool world_options_only, b
default:
cata_fatal( "invalid ItemType" );
}
} else if( action == "QUIT" ) {
} else if( are_we_quitting() || action == "QUIT" ) {
break;
}
}
Expand Down
3 changes: 2 additions & 1 deletion src/string_input_popup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

#include "cata_scope_helpers.h"
#include "catacharset.h"
#include "game.h"
#include "input.h"
#include "input_context.h"
#include "output.h"
Expand Down Expand Up @@ -461,7 +462,7 @@ const std::string &string_input_popup::query_string( const bool loop, const bool

if( desc_view_ptr && desc_view_ptr->handle_navigation( action, *ctxt ) ) {
// NO FURTHER ACTION REQUIRED
} else if( action == "TEXT.QUIT" ) {
} else if( are_we_quitting() || action == "TEXT.QUIT" ) {
#if defined(__ANDROID__)
if( get_option<bool>( "ANDROID_AUTO_KEYBOARD" ) ) {
StopTextInput();
Expand Down
Loading