Update: Merge branch 'jgrpp_master_cmake' into jgrpp_cmake

This commit is contained in:
TechGeekNZ
2020-06-27 20:46:53 +12:00
committed by Jonathan G Rennison
329 changed files with 4044 additions and 32403 deletions

35
src/video/CMakeLists.txt Normal file
View 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
)

View File

@@ -0,0 +1,8 @@
add_files(
cocoa_keys.h
cocoa_v.h
cocoa_v.mm
event.mm
wnd_quartz.mm
CONDITION APPLE
)

View File

@@ -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"

View File

@@ -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(