Jonathan G Rennison
43980639de
Merge branch 'master' into jgrpp
...
# Conflicts:
# .gitignore
# CMakeLists.txt
# src/3rdparty/optional/optional.hpp
# src/group_cmd.cpp
# src/industry_cmd.cpp
# src/misc_gui.cpp
# src/video/sdl2_v.cpp
3 years ago
Patric Stout
d5b9f7ac37
Add: [Emscripten] use "relative mouse mode" with SDL2
...
This mode doesn't wrap the mouse constantly, but requests SDL
to lock the mouse pointer. This is needed, as with Emscripten
you are not allowed to change the mouse poisition (only to lock
it into place).
4 years ago
Patric Stout
d15dc9f40f
Add: support for emscripten (play-OpenTTD-in-the-browser)
...
Emscripten compiles to WASM, which can be loaded via
HTML / JavaScript. This allows you to play OpenTTD inside a
browser.
Co-authored-by: milek7 <me@milek7.pl>
4 years ago
Patric Stout
2da07f7615
Codechange: unroll the SDL2 main loop
...
This commit prepares for the next commit, as Emscripten needs to
have a way to trigger a single iteration of the main loop. To
keep the real changes more clear, this commit only unrolls the
loop, and makes no changes to the logic itself.
4 years ago
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
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
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
4c59dfb6b1
Fix data race during palette animation with threaded blitters
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
4 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.
4 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
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
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
nikolas
2d27e8e685
Add #6173 : New SDL 2 based video and sound drivers ( #7086 )
5 years ago