File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -33,13 +33,26 @@ void Engine::initialize_audio(){
3333 this ->audio_device .reset (new AudioDevice);
3434}
3535
36+ const char *to_string (PokemonVersion version){
37+ switch (version){
38+ case PokemonVersion::Red:
39+ return " Pok\xC3\xA9 mon Red" ;
40+ break ;
41+ case PokemonVersion::Blue:
42+ return " Pok\xC3\xA9 mon Blue" ;
43+ default :
44+ return " Pok\xC3\xA9 mon ?" ;
45+ }
46+ }
47+
3648void Engine::run (){
3749 if (std::this_thread::get_id () != this ->main_thread_id )
3850 throw std::runtime_error (" Engine::run() must be called from the main thread!" );
3951
4052 PokemonVersion version = PokemonVersion::Red;
4153 bool continue_running = true ;
4254 while (continue_running){
55+ this ->video_device ->set_window_title (to_string (version));
4356 this ->wait_remainder = 0 ;
4457 this ->restart_requested = false ;
4558 this ->debug_mode = false ;
You can’t perform that action at this time.
0 commit comments