follow-up, program_state
This commit is contained in:
@@ -4037,7 +4037,7 @@ void NetHackQtMainWindow::keyPressEvent(QKeyEvent* event)
|
||||
|
||||
void NetHackQtMainWindow::closeEvent(QCloseEvent* e)
|
||||
{
|
||||
if ( svp.program_state.something_worth_saving ) {
|
||||
if ( program_state.something_worth_saving ) {
|
||||
switch ( QMessageBox::information( this, "NetHack",
|
||||
"This will end your NetHack session",
|
||||
"&Save", "&Cancel", 0, 1 ) )
|
||||
@@ -4849,7 +4849,7 @@ void NetHackQtBind::qt_update_inventory()
|
||||
if (main)
|
||||
main->updateInventory();
|
||||
/* doesn't work yet
|
||||
if (svp.program_state.something_worth_saving && iflags.perm_invent)
|
||||
if (program_state.something_worth_saving && iflags.perm_invent)
|
||||
display_inventory(NULL, FALSE);
|
||||
*/
|
||||
}
|
||||
@@ -4903,14 +4903,14 @@ int NetHackQtBind::qt_nhgetch()
|
||||
//
|
||||
while (keybuffer.Empty()
|
||||
#ifdef SAFERHANGUP
|
||||
&& !svp.program_state.done_hup
|
||||
&& !program_state.done_hup
|
||||
#endif
|
||||
) {
|
||||
qApp->enter_loop();
|
||||
}
|
||||
|
||||
#ifdef SAFERHANGUP
|
||||
if (svp.program_state.done_hup && keybuffer.Empty()) return '\033';
|
||||
if (program_state.done_hup && keybuffer.Empty()) return '\033';
|
||||
#endif
|
||||
return keybuffer.GetAscii();
|
||||
}
|
||||
@@ -4924,13 +4924,13 @@ int NetHackQtBind::qt_nh_poskey(int *x, int *y, int *mod)
|
||||
//
|
||||
while (keybuffer.Empty() && clickbuffer.Empty()
|
||||
#ifdef SAFERHANGUP
|
||||
&& !svp.program_state.done_hup
|
||||
&& !program_state.done_hup
|
||||
#endif
|
||||
) {
|
||||
qApp->enter_loop();
|
||||
}
|
||||
#ifdef SAFERHANGUP
|
||||
if (svp.program_state.done_hup && keybuffer.Empty()) return '\033';
|
||||
if (program_state.done_hup && keybuffer.Empty()) return '\033';
|
||||
#endif
|
||||
if (!keybuffer.Empty()) {
|
||||
return keybuffer.GetAscii();
|
||||
@@ -5179,7 +5179,7 @@ bool NetHackQtBind::notify(QObject *receiver, QEvent *event)
|
||||
|
||||
bool result=QApplication::notify(receiver,event);
|
||||
#ifdef SAFERHANGUP
|
||||
if (svp.program_state.done_hup) {
|
||||
if (program_state.done_hup) {
|
||||
keybuffer.Put('\033');
|
||||
qApp->exit_loop();
|
||||
return TRUE;
|
||||
|
||||
Reference in New Issue
Block a user