本想通過 SDL_CreateWindow 創建一個 超大窗口(2000,800). 按原比例顯示一張圖片. 但是一旦設置寬度或高度超過屏幕分辨率.就參數無效,變成屏幕大小窗口.
通過跟蹤SDL 代碼: SDL_windowswindow.c SetupWindowData函數中有如下代碼:
/* We tried to create a window larger than the desktop and Windows didn't allow it. Override! */
WIN_SetWindowPositionInternal(_this, window, SWP_NOCOPYBITS | SWP_NOZORDER | SWP_NOACTIVATE );
WIN_SetWindowPositionInternal(_this, window, SWP_NOCOPYBITS | SWP_NOZORDER | SWP_NOACTIVATE );
一旦通過這個方法修改:
參考;
http://stackoverflow.com/questions/445893/create-window-larger-than-desktop-display-resolution