Subversion Repository Public Repository

Divide-Framework

This repository has no backups
This repository's network speed is throttled to 100KB/sec

Diff Revisions 969 vs 970 for /trunk/Source Code/Platform/DisplayWindow.cpp

Diff revisions: vs.
  @@ -52,6 +52,7 @@
52 52 _sdlWindow(nullptr),
53 53 _internalMoveEvent(false),
54 54 _externalResizeEvent(false),
55 + _clearColour(DefaultColours::DIVIDE_BLUE),
55 56 _windowID(std::numeric_limits<Uint32>::max()),
56 57 _inputHandler(std::make_unique<Input::InputInterface>(*this))
57 58 {
  @@ -62,11 +63,16 @@
62 63
63 64 DisplayWindow::~DisplayWindow()
64 65 {
65 - destroyWindow();
66 + destroyWindow();
66 67 }
67 68
68 69 ErrorCode DisplayWindow::destroyWindow() {
70 +
69 71 if (_type != WindowType::COUNT && _sdlWindow != nullptr) {
72 + if (_destroyCbk) {
73 + _destroyCbk();
74 + }
75 +
70 76 _inputHandler->terminate();
71 77 SDL_DestroyWindow(_sdlWindow);
72 78 _sdlWindow = nullptr;
  @@ -151,9 +157,9 @@
151 157 args._flag = true;
152 158 notifyListeners(WindowEvent::GAINED_FOCUS, args);
153 159 _parent.handleWindowEvent(WindowEvent::GAINED_FOCUS,
154 - getGUID(),
155 - event.window.data1,
156 - event.window.data2);
160 + getGUID(),
161 + event.window.data1,
162 + event.window.data2);
157 163 } break;
158 164 case SDL_WINDOWEVENT_LEAVE:
159 165 case SDL_WINDOWEVENT_FOCUS_LOST: {