Skip to content

Commit

Permalink
ENGINES: Access WindowMan methods directly instead of per GfxMan
Browse files Browse the repository at this point in the history
  • Loading branch information
farmboy0 authored and DrMcCoy committed Oct 23, 2016
1 parent c3deda4 commit 82f4fa6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/engines/aurora/console.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ ConsoleWindow::ConsoleWindow(const Common::UString &font, size_t lines, size_t h
_lines.back()->disableColorTokens(true);
}

notifyResized(0, 0, GfxMan.getScreenWidth(), GfxMan.getScreenHeight());
notifyResized(0, 0, WindowMan.getWindowWidth(), WindowMan.getWindowHeight());

updateScrollbarLength();
updateScrollbarPosition();
Expand Down
4 changes: 2 additions & 2 deletions src/engines/aurora/gui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -467,13 +467,13 @@ void GUI::mouseWheel(const Events::Event &event) {
}

float GUI::toGUIX(int x) {
float sW = GfxMan.getScreenWidth();
float sW = WindowMan.getWindowWidth();

return (x - (sW / 2.0f));
}

float GUI::toGUIY(int y) {
float sH = GfxMan.getScreenHeight();
float sH = WindowMan.getWindowHeight();

return ((sH - y) - (sH / 2.0f));
}
Expand Down
4 changes: 2 additions & 2 deletions src/engines/gamethread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
#include "src/engines/gamethread.h"
#include "src/engines/enginemanager.h"

#include "src/graphics/graphics.h"
#include "src/graphics/windowman.h"

#include "src/events/events.h"

Expand Down Expand Up @@ -64,7 +64,7 @@ void GameThread::init(const Common::UString &baseDir, const std::list<const Engi
if (!ConfigMan.getKey("description", description))
description = _game->getGameName(true);

GfxMan.setWindowTitle(Common::UString(Version::getProjectName()) + " -- " + description);
WindowMan.setWindowTitle(Common::UString(Version::getProjectName()) + " -- " + description);

status("Detected game \"%s\"", _game->getGameName(false).c_str());
}
Expand Down

0 comments on commit 82f4fa6

Please sign in to comment.