Skip to content

Commit 125377f

Browse files
authored
do not reset lab state when going to options (#7226)
1 parent 6ae95c6 commit 125377f

3 files changed

Lines changed: 6 additions & 4 deletions

File tree

code/lab/labv2.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,10 @@ void lab_init() {
1717
gr_set_clear_color(0, 0, 0);
1818
}
1919

20-
void lab_close() {
21-
LMGR.reset();
20+
void lab_close(bool reset) {
21+
if (reset) {
22+
LMGR.reset();
23+
}
2224
gameseq_post_event(GS_EVENT_PREVIOUS_STATE);
2325
}
2426

code/lab/labv2.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ enum class LabMode {
99
};
1010

1111
void lab_init();
12-
void lab_close();
12+
void lab_close(bool reset);
1313
void lab_do_frame(float frametime);

freespace2/freespace.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5699,7 +5699,7 @@ void game_leave_state( int old_state, int new_state )
56995699
break;
57005700

57015701
case GS_STATE_LAB:
5702-
lab_close();
5702+
lab_close(new_state != GS_STATE_OPTIONS_MENU);
57035703
// restore default cursor and enable it --wookieejedi
57045704
if (!Is_standalone) {
57055705
io::mouse::Cursor* cursor = io::mouse::CursorManager::get()->loadCursor("cursor", true);

0 commit comments

Comments
 (0)