Update: Merge branch 'jgrpp_master_cmake' into jgrpp_cmake
This commit is contained in:
35
src/video/CMakeLists.txt
Normal file
35
src/video/CMakeLists.txt
Normal file
@@ -0,0 +1,35 @@
|
||||
add_subdirectory(cocoa)
|
||||
|
||||
if (NOT OPTION_DEDICATED)
|
||||
add_files(
|
||||
allegro_v.cpp
|
||||
allegro_v.h
|
||||
CONDITION Allegro_FOUND
|
||||
)
|
||||
|
||||
add_files(
|
||||
sdl_v.cpp
|
||||
sdl_v.h
|
||||
CONDITION SDL_FOUND
|
||||
)
|
||||
|
||||
add_files(
|
||||
sdl2_v.cpp
|
||||
sdl2_v.h
|
||||
CONDITION SDL2_FOUND
|
||||
)
|
||||
|
||||
add_files(
|
||||
win32_v.cpp
|
||||
win32_v.h
|
||||
CONDITION WIN32
|
||||
)
|
||||
endif (NOT OPTION_DEDICATED)
|
||||
|
||||
add_files(
|
||||
dedicated_v.cpp
|
||||
dedicated_v.h
|
||||
null_v.cpp
|
||||
null_v.h
|
||||
video_driver.hpp
|
||||
)
|
||||
8
src/video/cocoa/CMakeLists.txt
Normal file
8
src/video/cocoa/CMakeLists.txt
Normal file
@@ -0,0 +1,8 @@
|
||||
add_files(
|
||||
cocoa_keys.h
|
||||
cocoa_v.h
|
||||
cocoa_v.mm
|
||||
event.mm
|
||||
wnd_quartz.mm
|
||||
CONDITION APPLE
|
||||
)
|
||||
@@ -5,7 +5,7 @@
|
||||
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/** @file null_v.cpp The videio driver that doesn't blit. */
|
||||
/** @file null_v.cpp The video driver that doesn't blit. */
|
||||
|
||||
#include "../stdafx.h"
|
||||
#include "../gfx_func.h"
|
||||
|
||||
@@ -470,12 +470,10 @@ bool VideoDriver_SDL::CreateMainSurface(uint w, uint h, bool resize)
|
||||
seprintf(caption, lastof(caption), "OpenTTD %s", _openttd_revision);
|
||||
|
||||
if (_sdl_window == nullptr) {
|
||||
Uint32 flags = SDL_WINDOW_SHOWN;
|
||||
Uint32 flags = SDL_WINDOW_SHOWN | SDL_WINDOW_RESIZABLE;
|
||||
|
||||
if (_fullscreen) {
|
||||
flags |= SDL_WINDOW_FULLSCREEN;
|
||||
} else {
|
||||
flags |= SDL_WINDOW_RESIZABLE;
|
||||
}
|
||||
|
||||
_sdl_window = SDL_CreateWindow(
|
||||
|
||||
Reference in New Issue
Block a user