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;
|
||||
|
||||
@@ -907,7 +907,7 @@ gnome_nhgetch()
|
||||
g_askingQuestion = 1;
|
||||
/* Process events until a key press event arrives. */
|
||||
while (g_numKeys == 0) {
|
||||
if (svp.program_state.done_hup)
|
||||
if (program_state.done_hup)
|
||||
return '\033';
|
||||
gtk_main_iteration();
|
||||
}
|
||||
@@ -945,7 +945,7 @@ gnome_nh_poskey(int *x, int *y, int *mod)
|
||||
g_askingQuestion = 0;
|
||||
/* Process events until a key or map-click arrives. */
|
||||
while (g_numKeys == 0 && g_numClicks == 0) {
|
||||
if (svp.program_state.done_hup)
|
||||
if (program_state.done_hup)
|
||||
return '\033';
|
||||
gtk_main_iteration();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user