src/video/windows/SDL_windowswindow.c
changeset 6403 8d34c6248f4a
parent 6138 4c64952a58fb
child 6422 fd0ac1b56115
     1.1 --- a/src/video/windows/SDL_windowswindow.c	Fri Aug 24 10:03:05 2012 -0700
     1.2 +++ b/src/video/windows/SDL_windowswindow.c	Fri Aug 24 19:34:28 2012 -0400
     1.3 @@ -74,7 +74,6 @@
     1.4  SetupWindowData(_THIS, SDL_Window * window, HWND hwnd, SDL_bool created)
     1.5  {
     1.6      SDL_VideoData *videodata = (SDL_VideoData *) _this->driverdata;
     1.7 -    SDL_VideoDisplay *display = SDL_GetDisplayForWindow(window);
     1.8      SDL_WindowData *data;
     1.9  
    1.10      /* Allocate the window data */
    1.11 @@ -193,7 +192,6 @@
    1.12  int
    1.13  WIN_CreateWindow(_THIS, SDL_Window * window)
    1.14  {
    1.15 -    SDL_VideoDisplay *display = SDL_GetDisplayForWindow(window);
    1.16      HWND hwnd;
    1.17      RECT rect;
    1.18      DWORD style = STYLE_BASIC;
    1.19 @@ -344,7 +342,6 @@
    1.20  void
    1.21  WIN_SetWindowPosition(_THIS, SDL_Window * window)
    1.22  {
    1.23 -    SDL_VideoDisplay *display = SDL_GetDisplayForWindow(window);
    1.24      HWND hwnd = ((SDL_WindowData *) window->driverdata)->hwnd;
    1.25      RECT rect;
    1.26      DWORD style;
    1.27 @@ -481,11 +478,12 @@
    1.28  WIN_MaximizeWindow(_THIS, SDL_Window * window)
    1.29  {
    1.30      HWND hwnd = ((SDL_WindowData *) window->driverdata)->hwnd;
    1.31 -    SDL_VideoData *videodata = (SDL_VideoData *) _this->driverdata;
    1.32  
    1.33  #ifdef _WIN32_WCE
    1.34 -    if((window->flags & SDL_WINDOW_FULLSCREEN) && videodata->SHFullScreen)
    1.35 +    if((window->flags & SDL_WINDOW_FULLSCREEN) && videodata->SHFullScreen) {
    1.36 +        SDL_VideoData *videodata = (SDL_VideoData *) _this->driverdata;
    1.37          videodata->SHFullScreen(hwnd, SHFS_HIDETASKBAR | SHFS_HIDESTARTICON | SHFS_HIDESIPBUTTON);
    1.38 +    }
    1.39  #endif
    1.40  
    1.41      ShowWindow(hwnd, SW_MAXIMIZE);
    1.42 @@ -495,13 +493,14 @@
    1.43  WIN_MinimizeWindow(_THIS, SDL_Window * window)
    1.44  {
    1.45      HWND hwnd = ((SDL_WindowData *) window->driverdata)->hwnd;
    1.46 -    SDL_VideoData *videodata = (SDL_VideoData *) _this->driverdata;
    1.47  
    1.48      ShowWindow(hwnd, SW_MINIMIZE);
    1.49  
    1.50  #ifdef _WIN32_WCE
    1.51 -    if((window->flags & SDL_WINDOW_FULLSCREEN) && videodata->SHFullScreen)
    1.52 +    if((window->flags & SDL_WINDOW_FULLSCREEN) && videodata->SHFullScreen) {
    1.53 +        SDL_VideoData *videodata = (SDL_VideoData *) _this->driverdata;
    1.54          videodata->SHFullScreen(hwnd, SHFS_SHOWTASKBAR | SHFS_SHOWSTARTICON | SHFS_SHOWSIPBUTTON);
    1.55 +    }
    1.56  #endif
    1.57  }
    1.58