summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/windowmanager-sdl.cc
diff options
context:
space:
mode:
authorRaphael Langella <raphael.langella@gmail.com>2010-10-12 23:35:37 +0200
committerRaphael Langella <raphael.langella@gmail.com>2010-10-12 23:35:37 +0200
commit83ad1df84039e24257ffa5943132cfd908f36cd4 (patch)
tree3e5131fab5856bb6a84da1f445d55f287d9d4f5b /crawl-ref/source/windowmanager-sdl.cc
parentcec1b6e8d63ca618c3a2b93623a28d89cd321165 (diff)
downloadcrawl-ref-83ad1df84039e24257ffa5943132cfd908f36cd4.tar.gz
crawl-ref-83ad1df84039e24257ffa5943132cfd908f36cd4.zip
New option tile_align_at_top (windows only)
When set, the window will be aligned at the top of the screen instead of being centered (avoid taskbar overlap, see mantis 2043). In theory, it would be possible to give the player full control of the window position, but it's more complicated and I don't see any use for it. It can easily be added if anyone ever request it.
Diffstat (limited to 'crawl-ref/source/windowmanager-sdl.cc')
-rw-r--r--crawl-ref/source/windowmanager-sdl.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/crawl-ref/source/windowmanager-sdl.cc b/crawl-ref/source/windowmanager-sdl.cc
index b2104b1278..2399c168ea 100644
--- a/crawl-ref/source/windowmanager-sdl.cc
+++ b/crawl-ref/source/windowmanager-sdl.cc
@@ -245,6 +245,8 @@ int SDLWrapper::init(coord_def *m_windowsz)
video_info = SDL_GetVideoInfo();
+ _desktop_width = video_info->current_w;
+
SDL_EnableUNICODE(true);
SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);
@@ -312,6 +314,11 @@ int SDLWrapper::screen_height() const
return (video_info->current_h);
}
+int SDLWrapper::desktop_width() const
+{
+ return (_desktop_width);
+}
+
void SDLWrapper::set_window_title(const char *title)
{
SDL_WM_SetCaption(title, CRAWL);