Page Menu
Home
Phabricator (Chris)
Search
Configure Global Search
Log In
Files
F126685
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/util/events.cpp b/util/events.cpp
index d5c8a32e..e837644a 100644
--- a/util/events.cpp
+++ b/util/events.cpp
@@ -1,61 +1,61 @@
#ifdef USE_SDL
#include <SDL.h>
#endif
#include "events.h"
-#include "shutdown_exception.h"
+#include "exceptions/shutdown_exception.h"
#include "thread.h"
#include "funcs.h"
namespace Util{
EventManager::EventManager(){
}
#ifdef USE_SDL
void EventManager::runSDL(){
SDL_Event event;
while (SDL_PollEvent(&event) == 1){
switch (event.type){
case SDL_QUIT : {
dispatch(CloseWindow);
break;
}
default : {
break;
}
}
}
}
#endif
void EventManager::run(){
#ifdef USE_SDL
runSDL();
#endif
}
/* kill the program if the user requests */
void EventManager::waitForThread(WaitThread & thread){
while (!thread.isRunning()){
try{
run();
} catch (const ShutdownException & death){
thread.kill();
throw death;
}
Util::rest(10);
}
}
EventManager::~EventManager(){
}
void EventManager::dispatch(Event type){
switch (type){
case CloseWindow : {
throw ShutdownException();
}
}
}
}
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Thu, Jun 11, 12:32 PM (3 w, 4 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
69049
Default Alt Text
(1 KB)
Attached To
Mode
R75 R-Tech1
Attached
Detach File
Event Timeline