Mercurial > hg > orthanc-stone
comparison Applications/Generic/GuiAdapter.cpp @ 1319:0290b7060167 broker
Build fix C++03
author | Benjamin Golinvaux <bgo@osimis.io> |
---|---|
date | Tue, 17 Mar 2020 08:57:45 +0100 |
parents | 8981bfca3457 |
children | 1b24f6b06408 |
comparison
equal
deleted
inserted
replaced
1318:cbfdba08e039 | 1319:0290b7060167 |
---|---|
679 if (windowTitle != "" && (canvasName != windowTitle)) | 679 if (windowTitle != "" && (canvasName != windowTitle)) |
680 sendEvent = false; | 680 sendEvent = false; |
681 | 681 |
682 if (sendEvent) | 682 if (sendEvent) |
683 { | 683 { |
684 auto func = sdlEventHandlers_[i].func; | 684 OnSdlEventCallback func = sdlEventHandlers_[i].func; |
685 (*func)(canvasName, sdlEvent, sdlEventHandlers_[i].userData); | 685 (*func)(canvasName, sdlEvent, sdlEventHandlers_[i].userData); |
686 } | 686 } |
687 } | 687 } |
688 } | 688 } |
689 | 689 |
911 sdlEvents.push_back(sdlEvent); | 911 sdlEvents.push_back(sdlEvent); |
912 } | 912 } |
913 } | 913 } |
914 | 914 |
915 // SECOND: collect all user events | 915 // SECOND: collect all user events |
916 for (auto& it : userEventsMap) | 916 for (std::map<Uint32,SDL_Event>::const_iterator it = userEventsMap.begin(); it != userEventsMap.end(); ++it) |
917 sdlEvents.push_back(it.second); | 917 sdlEvents.push_back(it->second); |
918 | 918 |
919 // now process the events | 919 // now process the events |
920 for(const SDL_Event& sdlEvent : sdlEvents) | 920 for (std::vector<SDL_Event>::const_iterator it = sdlEvents.begin(); it != sdlEvents.end(); ++it) |
921 { | 921 { |
922 const SDL_Event& sdlEvent = *it; | |
922 // TODO: lock all viewports here! (use a scoped object) | 923 // TODO: lock all viewports here! (use a scoped object) |
923 | 924 |
924 if (sdlEvent.type == SDL_QUIT) | 925 if (sdlEvent.type == SDL_QUIT) |
925 { | 926 { |
926 // TODO: call exit callbacks here | 927 // TODO: call exit callbacks here |