summaryrefslogtreecommitdiffstats
path: root/src/main.rs
diff options
context:
space:
mode:
authorNao Pross <naopross@thearcway.org>2018-12-17 15:33:56 +0100
committerNao Pross <naopross@thearcway.org>2018-12-17 15:33:56 +0100
commit6f809f525fc2ab6b93cff48b55abe104699eb3d8 (patch)
tree645329c9ad54215ca47617c645e11ac7c6ce89ae /src/main.rs
parentMove back from Rust 2018 edition to stable (diff)
downloadSubconscious-rs-6f809f525fc2ab6b93cff48b55abe104699eb3d8.tar.gz
Subconscious-rs-6f809f525fc2ab6b93cff48b55abe104699eb3d8.zip
Implement loading of tile sets
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs18
1 files changed, 10 insertions, 8 deletions
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