It looks like handleevents() returns true when the window loses focus, so the processor was maxing out again if Mapster was running but wasn't the active window. This fixes that.

git-svn-id: https://svn.eduke32.com/eduke32@451 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2007-01-12 05:49:09 +00:00
parent 3205ee4fd1
commit 8e84d072c2
4 changed files with 36 additions and 20 deletions

View file

@ -433,7 +433,8 @@ CANCEL:
quitflag = 1; quitflag = 1;
break; break;
} }
} else idle(); }
idle();
if (keystatus[0x15] != 0) { if (keystatus[0x15] != 0) {
keystatus[0x15] = 0; keystatus[0x15] = 0;
@ -458,7 +459,7 @@ CANCEL:
while ((keystatus[1]|keystatus[0x1c]|keystatus[0x39]|keystatus[0x31]|keystatus[0x2e]) == 0) while ((keystatus[1]|keystatus[0x1c]|keystatus[0x39]|keystatus[0x31]|keystatus[0x2e]) == 0)
{ {
if (handleevents()) { if (quitevent) break; } // like saying no if (handleevents()) { if (quitevent) break; } // like saying no
else idle(); idle();
if (keystatus[0x15] != 0) { if (keystatus[0x15] != 0) {
keystatus[0x15] = 0; keystatus[0x15] = 0;
@ -2501,7 +2502,8 @@ long gettile(long tilenum)
if (handleevents()) { if (handleevents()) {
if (quitevent) quitevent = 0; if (quitevent) quitevent = 0;
} else idle(); }
idle();
synctics = totalclock-lockclock; synctics = totalclock-lockclock;
lockclock += synctics; lockclock += synctics;
@ -2571,7 +2573,8 @@ long gettile(long tilenum)
{ {
if (handleevents()) { if (handleevents()) {
if (quitevent) quitevent = 0; if (quitevent) quitevent = 0;
} else idle(); }
idle();
ch = bgetchar(); ch = bgetchar();
@ -2822,8 +2825,9 @@ void overheadeditor(void)
keystatus[1] = 1; keystatus[1] = 1;
quitevent = 0; quitevent = 0;
} }
} else idle(); }
idle();
OSD_DispatchQueued(); OSD_DispatchQueued();
oldmousebstatus = bstatus; oldmousebstatus = bstatus;
@ -5460,7 +5464,8 @@ CANCEL:
if (quitevent) { if (quitevent) {
quitevent = 0; quitevent = 0;
} }
} else idle(); }
idle();
ch = bgetchar(); ch = bgetchar();
@ -5482,7 +5487,8 @@ CANCEL:
if (quitevent) { if (quitevent) {
quitevent = 0; quitevent = 0;
} }
} else idle(); }
idle();
ch = bgetchar(); ch = bgetchar();
@ -5707,7 +5713,8 @@ CANCEL:
if (handleevents()) { if (handleevents()) {
if (quitevent) quitevent = 0; if (quitevent) quitevent = 0;
} else idle(); }
idle();
ch = bgetchar(); ch = bgetchar();
@ -5799,7 +5806,8 @@ CANCEL:
{ {
if (handleevents()) { if (handleevents()) {
if (quitevent) quitevent = 0; if (quitevent) quitevent = 0;
} else idle(); }
idle();
ch = bgetchar(); ch = bgetchar();
@ -5813,7 +5821,8 @@ CANCEL:
{ {
if (handleevents()) { if (handleevents()) {
if (quitevent) break; // like saying no if (quitevent) break; // like saying no
} else idle(); }
idle();
ch = bgetchar(); ch = bgetchar();
@ -6370,7 +6379,8 @@ long getnumber16(char namestart[80], long num, long maxnumber, char sign)
{ {
if (handleevents()) { if (handleevents()) {
if (quitevent) quitevent = 0; if (quitevent) quitevent = 0;
} else idle(); }
idle();
ch = bgetchar(); ch = bgetchar();
@ -6571,7 +6581,8 @@ long menuselect(void)
keystatus[1] = 1; keystatus[1] = 1;
quitevent = 0; quitevent = 0;
} }
} else idle(); }
idle();
ch = bgetchar(); ch = bgetchar();
{ // JBF 20040208: seek to first name matching pressed character { // JBF 20040208: seek to first name matching pressed character
CACHE1D_FIND_REC *seeker = currentlist ? findfiles : finddirs; CACHE1D_FIND_REC *seeker = currentlist ? findfiles : finddirs;

View file

@ -2,7 +2,7 @@
; HM NIS Edit Wizard helper defines ; HM NIS Edit Wizard helper defines
!define PRODUCT_NAME "EDuke32" !define PRODUCT_NAME "EDuke32"
!define PRODUCT_VERSION "1.4.0" !define PRODUCT_VERSION "1.4.0 beta 3"
!define PRODUCT_PUBLISHER "EDuke32 Team" !define PRODUCT_PUBLISHER "EDuke32 Team"
!define PRODUCT_WEB_SITE "http://www.eduke32.com" !define PRODUCT_WEB_SITE "http://www.eduke32.com"
!define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\${PRODUCT_NAME}" !define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\${PRODUCT_NAME}"

View file

@ -41,7 +41,7 @@ Modifications for JonoF's port by Jonathon Fowler (jonof@edgenetwk.com)
#include "keyboard.h" #include "keyboard.h"
#include "scriptfile.h" #include "scriptfile.h"
#define VERSION " 1.0.6" #define VERSION " 1.1.0"
short floor_over_floor; short floor_over_floor;
@ -1626,7 +1626,8 @@ static int AskIfSure(void)
retval = 1; retval = 1;
break; break;
} }
} else idle(); }
idle();
if (keystatus[0x15] != 0) if (keystatus[0x15] != 0)
{ {
keystatus[0x15] = 0; keystatus[0x15] = 0;
@ -4952,7 +4953,8 @@ static void EditSectorData(short sectnum)
if (handleevents()) if (handleevents())
{ {
if (quitevent) quitevent = 0; if (quitevent) quitevent = 0;
} else idle(); }
idle();
printmessage16("Edit mode, press <Esc> to exit"); printmessage16("Edit mode, press <Esc> to exit");
if (keystatus[0xd0] > 0) if (keystatus[0xd0] > 0)
{ {
@ -5189,7 +5191,8 @@ static void EditWallData(short wallnum)
if (handleevents()) if (handleevents())
{ {
if (quitevent) quitevent = 0; if (quitevent) quitevent = 0;
} else idle(); }
idle();
printmessage16("Edit mode, press <Esc> to exit"); printmessage16("Edit mode, press <Esc> to exit");
if (keystatus[0xd0] > 0) if (keystatus[0xd0] > 0)
{ {
@ -5323,7 +5326,8 @@ static void EditSpriteData(short spritenum)
if (handleevents()) if (handleevents())
{ {
if (quitevent) quitevent = 0; if (quitevent) quitevent = 0;
} else idle(); }
idle();
printmessage16("Edit mode, press <Esc> to exit"); printmessage16("Edit mode, press <Esc> to exit");
if (keystatus[0xd0] > 0) if (keystatus[0xd0] > 0)
{ {
@ -5734,7 +5738,8 @@ static void FuncMenu(void)
if (handleevents()) if (handleevents())
{ {
if (quitevent) quitevent = 0; if (quitevent) quitevent = 0;
} else idle(); }
idle();
printmessage16("Select an option, press <Esc> to exit"); printmessage16("Select an option, press <Esc> to exit");
if (keystatus[0xd0] > 0) if (keystatus[0xd0] > 0)
{ {

View file

@ -20,7 +20,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/ */
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
#define VERSION " 1.4.0 svn" #define VERSION " 1.4.0 beta 3"
#define HEAD "EDuke32"VERSION" (shareware mode)" #define HEAD "EDuke32"VERSION" (shareware mode)"
#define HEAD2 "EDuke32"VERSION #define HEAD2 "EDuke32"VERSION