diff options
| author | Arne Dußin | 2020-11-09 22:02:35 +0100 |
|---|---|---|
| committer | Arne Dußin | 2020-11-09 22:02:35 +0100 |
| commit | b8edcda33f5c305a5e48f84ed5880bd720f6dfc0 (patch) | |
| tree | 66ae0e905d9cf0257a327b4b59691504fba65256 /src/main.rs | |
| parent | b06e0075bf4dfd51f8ad5df801f9c43fbd73df1f (diff) | |
| download | graf_karto-b8edcda33f5c305a5e48f84ed5880bd720f6dfc0.tar.gz graf_karto-b8edcda33f5c305a5e48f84ed5880bd720f6dfc0.zip | |
Remove instant exit key in favour of OS-keys
Diffstat (limited to 'src/main.rs')
| -rw-r--r-- | src/main.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs index 11cdcfe..a0d8a13 100644 --- a/src/main.rs +++ b/src/main.rs @@ -19,6 +19,7 @@ pub const CONFIG_FILE: &str = "config.ron"; fn main() { let (mut rl, thread) = raylib::init().resizable().title("Hello there!").build(); rl.set_target_fps(120); + rl.set_exit_key(None); // Load the configuration file, if available. let config = match Config::from_file(CONFIG_FILE) { @@ -30,7 +31,9 @@ fn main() { let config = Config::default(); if err.kind() == io::ErrorKind::NotFound { println!("Could not find a configuration file. Creating default."); - config.write_file(CONFIG_FILE); + config + .write_file(CONFIG_FILE) + .expect("Could not write config file."); } else { println!("Could not read configuration file: {}", err); println!("Using defaults for this run."); |
