free grabbed mouse in Demo Playback; improved Player-files deletion

This commit is contained in:
zicodxx 2007-05-16 11:26:34 +00:00
parent 4091731e64
commit e150919deb
4 changed files with 13 additions and 6 deletions

View file

@ -1,5 +1,9 @@
D1X-Rebirth Changelog
20070516
--------
main/game.c, main/inferno.c, main/newmenu.c: free grabbed mouse in Demo Playback; improved Player-files deletion
20070514
--------
SConstruct, arch/sdl/init.c, arch/sdl/joydefs.c, arch/sdl/mouse.c, arch/sdl/include/mouse.h, main/game.c, main/inferno.c, main/kconfig.c, main/kconfig.h, main/newmenu.c, main/newmenu.h, main/playsave.c, main/text.h: Added config field to map a Mouse Axis/Wheel to cycle Primary and Secondary weapons; lots of controls-related code cleaning

View file

@ -1772,7 +1772,7 @@ int do_game_pause(int allow_menu)
}
/* keep the mouse from wandering in SDL */
if (FindArg("-grabmouse"))
if (FindArg("-grabmouse") && (Newdemo_state != ND_STATE_PLAYBACK))
SDL_WM_GrabInput(SDL_GRAB_ON);
game_flush_inputs();

View file

@ -686,7 +686,7 @@ int main(int argc,char **argv)
#endif
/* keep the mouse from wandering in SDL */
if (FindArg("-grabmouse"))
if (FindArg("-grabmouse") && (Newdemo_state != ND_STATE_PLAYBACK))
SDL_WM_GrabInput(SDL_GRAB_ON);
game();

View file

@ -1487,7 +1487,7 @@ void delete_player_saved_games(char * name)
for (i=0;i<10; i++) {
sprintf( filename, "%s.sg%d", name, i );
unlink( filename );
remove( filename );
}
}
@ -1719,7 +1719,7 @@ ReadFileNames:
newmenu_show_cursor();
if (x==0) {
char * p;
char plxfile[256];
char plxfile[256], efffile[256];
int ret=0;
p = &filenames[(citem*14)+strlen(&filenames[citem*14])];
if (player_mode) {
@ -1736,10 +1736,13 @@ ReadFileNames:
if ((!ret) && player_mode) {
delete_player_saved_games( &filenames[citem*14] );
// also delete PLX file
sprintf(plxfile,"%.8s.plx",Players[Player_num].callsign);
// delete PLX and EFF files
sprintf(plxfile,"%.8s.plx",&filenames[citem*14]);
if (cfexist(plxfile))
remove(plxfile);
sprintf(efffile,"%.8s.eff",&filenames[citem*14]);
if (cfexist(efffile))
remove(efffile);
}
if (ret) {