|
|
@ -158,6 +158,10 @@ void Application::onKeyPressed(ofKeyEventArgs & args){ |
|
|
|
reboot(); |
|
|
|
break; |
|
|
|
|
|
|
|
case 'c': |
|
|
|
shutdown(); |
|
|
|
break; |
|
|
|
|
|
|
|
default: |
|
|
|
// All the other keypresses are handled by the application state onKeyPressed
|
|
|
|
_state->onKeyPressed(this, args); |
|
|
@ -308,6 +312,14 @@ void Application::reboot(){ |
|
|
|
#endif |
|
|
|
} |
|
|
|
|
|
|
|
void Application::shutdown(){ |
|
|
|
#ifdef TARGET_RASPBERRY_PI |
|
|
|
system("sudo shutdown -h now"); |
|
|
|
#else |
|
|
|
ofLogNotice("Application::shutdown()", "Supported only on Raspberry Pi"); |
|
|
|
#endif |
|
|
|
} |
|
|
|
|
|
|
|
bool Application::loadXmlSettings(string fileName){ |
|
|
|
if(!ofFile::doesFileExist(fileName)){ |
|
|
|
ofLogError("Application::loadXmlSettings()") << fileName << " does not exist"; |
|
|
|