Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions code/lab/labv2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@ void lab_init() {
gr_set_clear_color(0, 0, 0);
}

void lab_close() {
LMGR.reset();
void lab_close(bool reset) {
if (reset) {
LMGR.reset();
}
gameseq_post_event(GS_EVENT_PREVIOUS_STATE);
}

Expand Down
2 changes: 1 addition & 1 deletion code/lab/labv2.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ enum class LabMode {
};

void lab_init();
void lab_close();
void lab_close(bool reset);
void lab_do_frame(float frametime);
2 changes: 1 addition & 1 deletion freespace2/freespace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5695,7 +5695,7 @@ void game_leave_state( int old_state, int new_state )
break;

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