From 6f809f525fc2ab6b93cff48b55abe104699eb3d8 Mon Sep 17 00:00:00 2001 From: Nao Pross Date: Mon, 17 Dec 2018 15:33:56 +0100 Subject: Implement loading of tile sets --- src/main.rs | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'src/main.rs') diff --git a/src/main.rs b/src/main.rs index 3cf9d47..b5190bf 100644 --- a/src/main.rs +++ b/src/main.rs @@ -45,14 +45,16 @@ fn main() { graphics::update(&mut window); } - // aquire state resource - let mut game_state = match game_state.lock() { - Ok(game_state) => game_state, - Err(poisoned) => poisoned.into_inner(), - }; - - // stop game thread - game_state.running = false; + { + // aquire state resource + let mut game_state = match game_state.lock() { + Ok(game_state) => game_state, + Err(poisoned) => poisoned.into_inner(), + }; + + // stop game thread + game_state.running = false; + } }); // wait for both thread to die -- cgit v1.2.1