diff options
-rw-r--r-- | engines/gargoyle/glk.cpp | 2 | ||||
-rw-r--r-- | engines/gargoyle/windows.cpp | 6 | ||||
-rw-r--r-- | engines/gargoyle/windows.h | 6 |
3 files changed, 12 insertions, 2 deletions
diff --git a/engines/gargoyle/glk.cpp b/engines/gargoyle/glk.cpp index 278faf5678..7274ff2af4 100644 --- a/engines/gargoyle/glk.cpp +++ b/engines/gargoyle/glk.cpp @@ -136,7 +136,7 @@ strid_t Glk::glk_window_get_echo_stream(winid_t win) { } void Glk::glk_set_window(winid_t win) { - // TODO + _windows->setCurrent(win ? win->str : nullptr); } strid_t Glk::glk_stream_open_file(frefid_t fileref, glui32 fmode, diff --git a/engines/gargoyle/windows.cpp b/engines/gargoyle/windows.cpp index 8dc546a61d..0bc16b2c25 100644 --- a/engines/gargoyle/windows.cpp +++ b/engines/gargoyle/windows.cpp @@ -89,7 +89,7 @@ WindowStyle G_STYLES[style_NUMSTYLES] = { Windows::Windows(Graphics::Screen *screen) : _screen(screen), _forceRedraw(true), _moreFocus(false), _windowList(nullptr), _rootWin(nullptr), _focusWin(nullptr), _mask(nullptr), - _claimSelect(0) { + _claimSelect(0), _currentStr(nullptr) { _confLockCols = false; _confLockRows = false; _wMarginx = 15; @@ -280,6 +280,10 @@ void Windows::clearSelection() { _claimSelect = false; } +void Windows::setCurrent(Common::WriteStream *stream) { + _currentStr = stream; +} + /*--------------------------------------------------------------------------*/ Window::Window(Windows *windows, glui32 rock) : _magicnum(MAGIC_WINDOW_NUM), diff --git a/engines/gargoyle/windows.h b/engines/gargoyle/windows.h index 64adf81450..02fa7aab35 100644 --- a/engines/gargoyle/windows.h +++ b/engines/gargoyle/windows.h @@ -54,6 +54,7 @@ private: bool _moreFocus; bool _claimSelect; WindowMask *_mask; + Common::WriteStream *_currentStr; private: /** * Create a new window @@ -111,6 +112,11 @@ public: Window *getRoot() const { return _rootWin; } void clearSelection(); + + /** + * Set the current output stream + */ + void setCurrent(Common::WriteStream *stream); }; /** |