Jonathan G Rennison
51477334be
SDL2: Only pass a single rectangle to SDL_UpdateWindowSurfaceRects
...
This is to prevent screen tearing
4 years ago
Jonathan G Rennison
1298f49be6
SDL2: Update whole window surface if >= 80% needs updating
4 years ago
Jonathan G Rennison
0bfae346c1
Allow using the hash key in hotkeys (SDL)
4 years ago
TechGeekNZ
cf8ea74733
Update: Merge branch 'jgrpp_master_cmake' into jgrpp_cmake
4 years ago
nikolas
c9aff698d0
Fix #8104 : Always add WINDOW_RESIZABLE flag to SDL2 ( #8211 )
...
This fixes a bug that can reproduced with these steps:
* Start openttd in fullscreen mode
* Turn off fullscreen mode
* Try to resize the window. The window can't be resized.
4 years ago
TechGeekNZ
fe1925931d
Cleanup: Correct typographic errors in code comments.
4 years ago
Patric Stout
56d54cf60e
Add: introduce CMake for project management
...
CMake works on all our supported platforms, like MSVC, Mingw, GCC,
Clang, and many more. It allows for a single way of doing things,
so no longer we need shell scripts and vbs scripts to work on all
our supported platforms.
Additionally, CMake allows to generate project files for like MSVC,
KDevelop, etc.
This heavily reduces the lines of code we need to support multiple
platforms from a project perspective.
Addtiionally, this heavily improves our detection of libraries, etc.
4 years ago
Jonathan G Rennison
43c538fa7d
Merge branch 'master' into jgrpp
...
# Conflicts:
# src/town_cmd.cpp
4 years ago
TechGeekNZ
cdd2892c49
Codechange: Realign SDL driver with SDL2 driver to ease maintenance and emphasise differences.
4 years ago
Jonathan G Rennison
677940cfc6
Merge branch 'master' into jgrpp
4 years ago
Niels Martin Hansen
764497206a
Fix #8066 : Try another fallback colourspace if first one fails
4 years ago
Jonathan G Rennison
f8d6e781ba
Merge branch 'master' into jgrpp
...
# Conflicts:
# projects/openttd_vs140.vcxproj.filters
# projects/openttd_vs141.vcxproj.filters
# projects/openttd_vs142.vcxproj.filters
# src/base_consist.h
# src/company_base.h
# src/newgrf_config.cpp
# src/newgrf_config.h
# src/openttd.cpp
# src/saveload/saveload.cpp
# src/saveload/saveload.h
# src/saveload/station_sl.cpp
# src/settings.cpp
# src/signs_base.h
# src/string.cpp
# src/string_func.h
# src/table/misc_settings.ini
# src/table/settings.h.preamble
# src/town_cmd.cpp
# src/vehicle.cpp
# src/vehicle_cmd.cpp
# src/video/cocoa/cocoa_v.mm
# src/video/null_v.cpp
4 years ago
Michael Lutz
37bc2f8064
Codechange: Use std::string in the driver and blitter selection code.
4 years ago
Jonathan G Rennison
197a4f2e3e
fcitx: Use XLookupString instead of XLookupKeysym to fix modifier keys
...
See: #142
4 years ago
Jonathan G Rennison
74b6981d97
Merge branch 'master' into jgrpp
...
# Conflicts:
# src/os/macosx/macos.mm
# src/video/cocoa/cocoa_v.mm
# src/video/cocoa/fullscreen.mm
# src/video/cocoa/wnd_quartz.mm
# src/video/cocoa/wnd_quickdraw.mm
4 years ago
Michael Lutz
9dd8b3d430
Remove: [OSX] Stuff that is pre-10.7 from the Cocoa/Quartz video driver.
4 years ago
Michael Lutz
0e5be3887c
Remove: [OSX] Old fullscreen subdriver for pre 10.7 systems.
...
Since the move to C++11, building for pre 10.7 is not possible with the native
Apple tools. Also, due to bitrot, the file doesn't even compile anymore. While
this could be fixed, it shows that this subdriver is basically never used anymore.
4 years ago
Michael Lutz
a31cbbf67f
Remove: [OSX] QuickDraw video subdriver used for OSX versions up to 10.4.
...
Since the C++11 move, getting OpenTTD to compile and run for anything
below 10.7 basically requires building a custom compiler and libc++.
Also, the QuickDraw subdriver crashes on more modern OSX version. While this
is fixable, keeping the driver around is probably pointless.
4 years ago
Jonathan G Rennison
4c59dfb6b1
Fix data race during palette animation with threaded blitters
4 years ago
Jonathan G Rennison
d210bc4d14
Merge branch 'master' into jgrpp
...
# Conflicts:
# src/lang/korean.txt
# src/saveload/afterload.cpp
Recalculate docking tile cache due to 57553cd8
4 years ago
Sebastian Pauka
bd3a5876b0
Fix #7644 : [Cocoa] Manually set colorspace to sRGB
4 years ago
Jonathan G Rennison
dd99fd646d
Merge branch 'master' into jgrpp
...
# Conflicts:
# src/base_station_base.h
# src/industry.h
# src/industry_cmd.cpp
# src/industry_gui.cpp
# src/lang/korean.txt
# src/os/macosx/crashlog_osx.cpp
# src/station_cmd.cpp
# src/town.h
# src/town_cmd.cpp
# src/town_gui.cpp
5 years ago
xdavidwu
8fe38afd2b
Fix: [SDL2] Correct name of the video driver in debug log
...
SDL_GetVideoDriver(0) returns name of first video driver included in
the library, not the driver currently used.
SDL_GetCurrentVideoDriver() does what we want here.
5 years ago
Jonathan G Rennison
cbdd9f84d8
Merge branch 'master' into jgrpp
...
# Conflicts:
# src/console_gui.cpp
# src/lang/korean.txt
# src/video/sdl2_v.cpp
# src/video/sdl2_v.h
# src/window.cpp
# src/window_gui.h
5 years ago
S. D. Cloudt
13cc8a0cee
Cleanup: Removed SVN headers
5 years ago
Jonathan G Rennison
a15ace0f5b
Fix #7783 , Fix #7816 : [SDL2] Fix input handling in edit context
...
In particular this fixes handling of the shift key
5 years ago
Jonathan G Rennison
81f159434d
Codechange: Add EditBoxGainedFocus method to VideoDriver base class
5 years ago
Jonathan G Rennison
46f7c6a641
Change: [SDL2] Add an "unprintable" flag to struct VkMapping
...
SDL_Keysym::sym is not suitable for checking whether the character
is printable or not
5 years ago
Jonathan G Rennison
d41378c00a
Fix: [SDL2] Page down key not handled
...
SDLK_PAGEUP and SDLK_PAGEDOWN are not sequential
They must have separate entries in _vk_mapping
5 years ago
Jonathan G Rennison
3db399d7d9
Fix: [SDL2] Detection of backtick scancode
...
SDL_Keysym::scancode is a SDL_SCANCODE_* constant, not a raw scan code
5 years ago
Jonathan G Rennison
ca3c72438e
Merge branch 'master' into jgrpp
...
# Conflicts:
# Makefile.bundle.in
# src/os/macosx/string_osx.cpp
# src/station_cmd.cpp
5 years ago
Jonathan G Rennison
daf7cf1913
Fix: SDL2: Detection of backtick scancode
...
SDL_Keysym::scancode is a SDL_SCANCODE_* constant, not a raw scan code
5 years ago
Jonathan G Rennison
86953e1bef
Change: SDL2: Add an "unprintable" flag to struct VkMapping
...
SDL_Keysym::sym is not suitable for checking whether the character
is printable or not
5 years ago
Jonathan G Rennison
ab54beb3af
Fix: SDL2: Page down key: SDLK_PAGEUP and SDLK_PAGEDOWN are not sequential
...
They must have separate entries in _vk_mapping
5 years ago
Nikolas Nyby
4884dcacba
Fix #7784 : up/down/home/end key behavior in SDL2
...
Closes #7784 .
5 years ago
Michael Lutz
d5a9bd404a
Codechange: [OSX] Use std::unique_ptr with a custom deleter to simply memory management of Core Foundation types.
5 years ago
Jonathan G Rennison
5bf52ab736
SDL2: Fix Home and End keys not working in text editing contexts
5 years ago
Nikolas Nyby
f13b184588
Codechange: Don't use SDL_CreateRGBSurfaceWithFormat()
...
This function requires libSDL 2.0.5 or higher. It looks like we don't
need to use it, and can just use the original SDL_CreateRGBSurface(),
with the masks set to 0, to trigger the default 8-bit format, which is
SDL_PIXELFORMAT_INDEX8.
Closes #7785
Note: this code path is activated by using an 8-bit blitter, like:
./bin/openttd -b 8bpp-simple
5 years ago
Jonathan G Rennison
299becbb2f
SDL2: Fix up/down keys in console window
5 years ago
Jonathan G Rennison
67a725e813
SDL2: Handle Fcitx keypresses which do not generate an SDL_KEYDOWN
5 years ago
Jonathan G Rennison
87acac9700
SDL2: Fix handling of shift key in edit context
5 years ago
Jonathan G Rennison
29ed470e04
Fcitx: Fix edge cases around text handling and setup
5 years ago
Jonathan G Rennison
24b5cb0fdb
IME: Add direct support for Fcitx IME input, with SDL2 on *nix/X11.
5 years ago
Jonathan G Rennison
34a6f3c72a
Fix text input when not in edit box mode, fix backtick handling
5 years ago
Jonathan G Rennison
5d1578bb7f
Fix IME positioning with SDL2
5 years ago
Jonathan G Rennison
a4c677a571
Add basic IME support to SDL2 video driver
5 years ago
Jonathan G Rennison
edfd378e93
Merge branch 'master' into jgrpp
...
# Conflicts:
# source.list
# src/blitter/32bpp_anim.cpp
# src/linkgraph/linkgraphjob.cpp
# src/order_cmd.cpp
# src/vehicle.cpp
# src/vehicle_type.h
5 years ago
Jonathan G Rennison
33f5e00700
Null video driver: Add driver parameter to run until exit
5 years ago
JMcKiern
04f659e768
Fix: Some typos found using codespell
5 years ago
nikolas
2d27e8e685
Add #6173 : New SDL 2 based video and sound drivers ( #7086 )
5 years ago