1
0
forked from 0ad/0ad
Commit Graph

70 Commits

Author SHA1 Message Date
ffc4a56b9f Revert non-ASCII characters from source and configuration files introduced in 157c6af18e.
Fixes #6846

Differential Revision: https://code.wildfiregames.com/D5185
This was SVN commit r27965.
2023-12-03 00:30:12 +00:00
bb
157c6af18e Make the space in 0 A.D. non-breaking throughout the codebase.
Avoid cases of filenames
Update years in terms and other legal(ish) documents
Don't update years in license headers, since change is not meaningful

Will add linter rule in seperate commit

Happy recompiling everyone!

Original Patch By: Nescio
Comment By: Gallaecio
Differential Revision: D2620
This was SVN commit r27786.
2023-07-27 20:54:46 +00:00
a28fddcf72 Adds an option to disable mouse grab in fullscreen.
Refs #6649
Refs #545

Differential Revision: https://code.wildfiregames.com/D4974
This was SVN commit r27603.
2023-04-12 06:59:37 +00:00
e27a3c4e53 Fix Molten VK printing too many log messages
Reported by: @Langbart
Fixes #6719
Differential Revision: https://code.wildfiregames.com/D4913
This was SVN commit r27501.
2023-01-29 13:03:58 +00:00
d6121a43ea Add MoltenVK support to fix Vulkan on macOS.
Tested by: @Langbart, @real_tabasco_sauce, @wraitii
Refs #6636
Differential Revision: https://code.wildfiregames.com/D4905
This was SVN commit r27488.
2023-01-26 15:24:12 +00:00
a054bd7a9d Adds a warning in case of Vulkan window creation failure.
This was SVN commit r27478.
2023-01-21 23:14:29 +00:00
28707d61dd Fixes creating window on macOS in case of missing Vulkan driver. Fixes #6681
Tested By: Langbart
Differential Revision: https://code.wildfiregames.com/D4884
This was SVN commit r27438.
2023-01-13 20:32:36 +00:00
fc7c78b8cd Refactors window creation in CVideoMode.
Comments By: phosit, Stan
Differential Revision: https://code.wildfiregames.com/D4866
This was SVN commit r27388.
2023-01-09 00:13:52 +00:00
c0e888e2af Removes SetViewport from CRenderer.
Differential Revision: https://code.wildfiregames.com/D4849
This was SVN commit r27313.
2022-12-29 06:53:06 +00:00
480bc48194 Removes unused debug print of backend inside CVideoMode forgotten in 912202ff0c.
This was SVN commit r27185.
2022-10-30 00:43:45 +00:00
968fd50fb0 Moves Backend enum from CVideoMode to backends.
Comments By: phosit, Stan
Differential Revision: https://code.wildfiregames.com/D4809
This was SVN commit r27173.
2022-10-25 22:45:54 +00:00
62e589ab76 Adds renderer backend interface and dummy backend.
Comments By: phosit, Stan
Tested By: Langbart, phosit
Differential Revision: https://code.wildfiregames.com/D4636
This was SVN commit r26858.
2022-05-08 22:02:46 +00:00
3ed4eaf247 Removes ogl_WarnIfError from regular renderer code.
This was SVN commit r26850.
2022-05-02 21:52:21 +00:00
0d2faa1cab Adds debug context option for GL context creation.
This was SVN commit r26484.
2022-02-25 16:26:56 +00:00
912202ff0c Uses core GL functions for GLSL shaders.
Tested By: nwtour, Stan
Differential Revision: https://code.wildfiregames.com/D4416
This was SVN commit r26175.
2022-01-06 11:41:04 +00:00
7b8c66ec9f Adds config settings for borderless fullscreen and window modes.
Tested By: bb, Langbart
Differential Revision: https://code.wildfiregames.com/D4106
This was SVN commit r26148.
2021-12-31 12:05:48 +00:00
89c181ded1 Encapsulates information about GL inside device.
Commented By: Stan
Differential Revision: https://code.wildfiregames.com/D4375
This was SVN commit r26072.
2021-12-15 06:43:41 +00:00
3809457513 Replaces unclear PreferGLSL by direct renderer backend choice.
Commented By: Stan
Differential Revision: https://code.wildfiregames.com/D4363
This was SVN commit r26069.
2021-12-14 06:34:02 +00:00
5e61febf16 Resolves concerns from e4907bdb6e. Fixes #6395
Tested By: Langbart, nwtour
Differential Revision: https://code.wildfiregames.com/D4370
This was SVN commit r26051.
2021-12-10 21:29:40 +00:00
e4907bdb6e Forces GL 2.1 core context creation in VideoMode.
This was SVN commit r26031.
2021-12-04 22:01:20 +00:00
Angen
b4fbbed379 There have been quite a bit of number of questions how to change scale of the gui, because this option is hidden from the user.
Use dropdown with values. Implement confirmation box with countdown to
revert scale change because buttons can get unable to click.

Differential revision: D3037
Comments by: @vladislavbelov, @Stan, @wraitii, @pieq, @sera
Tested by: @Langbart
This was SVN commit r25966.
2021-10-17 10:58:51 +00:00
0e599a3176 Moves cursor to VideoMode to draw it via SDL.
It removes the software implementation intentionally. Because it
duplicates SDL functionality. But it might be added in future on demand.

Tested By: bb, Langbart
Differential Revision: https://code.wildfiregames.com/D4278
This was SVN commit r25936.
2021-09-21 22:44:46 +00:00
63c1347ef7 Removes windows enumeration on Windows to retrieve HWND taking it from SDL and wxWidgets.
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D4064
This was SVN commit r25709.
2021-06-06 15:31:55 +00:00
fdb4040838 Adds HiDPI mode for testing. HiDPI on Windows isn't supported in SDL yet. So we use a custom code.
Differential Revision: https://code.wildfiregames.com/D4076
This was SVN commit r25692.
2021-06-05 19:01:37 +00:00
d7ac3c6b89 Removes macOS system version include added in 7e87211d91 and forgotten in 9a2d0f803e.
This was SVN commit r25506.
2021-05-21 21:46:01 +00:00
7ae43c149e Replaces global g_VSync state by VideoMode property.
This was SVN commit r25504.
2021-05-21 21:33:43 +00:00
e7e6fe139e Allows to override GL version for SDL.
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D3448
This was SVN commit r24768.
2021-01-22 19:40:02 +00:00
5ee8354e99 Fix windows SEH hook when crashing in an std::thread
Follows 107d3d461f and other 'pthread->std::thread' diffs.

Windows uses Structured Exception Handling to allow reporting errors
(both C++ and hardware) nicely. This works by wrapping the code in a
__try __catch block.
The pthread wrapper did this automatically, but we now need to do it
explicitly for std::thread.

Tested by: Stan
Differential Revision: https://code.wildfiregames.com/D3261
This was SVN commit r24530.
2021-01-10 08:39:54 +00:00
409c436ae2 Remove obsolete GetVideoMode platform-specifics, replaces by platform-agnostic SDL2`s APIs.
Before and after the commit we don't support multiple displays and HiDPI
properly.

Patch By: linkmauve
Tested By: Angen, elexis, Stan
Differential Revision: https://code.wildfiregames.com/D2476
This was SVN commit r23754.
2020-06-08 17:49:26 +00:00
e9361705ae Refactor HWDetect and rendering options setup.
Remove duplication when setting graphic options by reading the configDB
directly.
Properly protect the ModIO config keys.

Approved By: linkmauve
Refs #5538

Differential Revision: https://code.wildfiregames.com/D1931
This was SVN commit r23747.
2020-06-07 13:16:57 +00:00
945ac4fc3b Do not change the gamma of the display on startup.
Added in df6fceba62 to (most likely) have some control over brightness,
this conflicted with dimming utilities and would not play nice with
starting 0 A.D. in windowed mode.

If gamma handling were to be reintroduced later, it should only affect
the 0 A.D. window.

Reviewed By: vladislavbelov
Differential Revision: https://code.wildfiregames.com/D1976
This was SVN commit r23722.
2020-06-01 05:12:51 +00:00
a89bcf837b Fix the window icon that cannot be loaded in release packages, refs 27d99765bb.
Discussed with Imarok and elexis.

This was SVN commit r21812.
2018-05-01 20:29:36 +00:00
0e710d716d Fixes the Alt + Tab crash in the fullscreen mode. Refs #4181.
Patch By: Angen
Comments By: echotangoecho, Imarok, Stan
Reviewed By: vladislavbelov
Trac Tickets: #4181
Differential Revision: https://code.wildfiregames.com/D1212
This was SVN commit r21476.
2018-03-09 22:23:03 +00:00
27d99765bb Add an icon to pyrogenesis' application window
Tested By: Imarok (Windows, Ubuntu w. Gnome), s0600204 (Arch w. Xfce),
ffffffff (Kubuntu w. KDE)
Reviewed By: ffffffff, s0600204
Differential Revision: https://code.wildfiregames.com/D768
Trac Tickets: #4363

This was SVN commit r20067.
2017-08-28 21:56:54 +00:00
417c84870c Actually remove trailing tabs from source/.
This was SVN commit r18991.
2016-11-23 14:09:58 +00:00
9a2d0f803e Remove disabled by default SDL1 support.
Refs #2041.

This was SVN commit r17470.
2015-12-14 10:52:21 +00:00
dec4552ffe Removes special handling of fullscreen toggle on OS X w/ SDL 1.2, which is no longer used
This was SVN commit r16453.
2015-03-21 21:01:01 +00:00
c9c80a9d94 SDL_SetWindowGammaRamp fails on Android, so don't bother using it.
Based on patch by BogDan. Refs #2996.

This was SVN commit r16204.
2015-01-23 20:39:02 +00:00
e02d7ad949 Automatically replace %hs/%ls with %s in CLogger format strings.
Everything is char* now, so we don't need to mess around with different
string types.

Done with:

  ag -ls 'LOG(MESSAGE|MESSAGERENDER|WARNING|ERROR)' source | xargs perl
-pi -e'1 while
s/(LOG(MESSAGE|MESSAGERENDER|WARNING|ERROR).*)%[hl]s/$1%s/g'

This was SVN commit r16187.
2015-01-22 20:36:24 +00:00
e9a33b71ae Manually fix the less trivial CLogger format strings.
This was SVN commit r16184.
2015-01-22 20:32:06 +00:00
49e2ecea63 Automatically convert all CLogger format strings from wchar_t* to char*.
Done with:

  ag -ls 'LOG(MESSAGE|MESSAGERENDER|WARNING|ERROR)' source | xargs sed
-i 's/LOG\(MESSAGE\|MESSAGERENDER\|WARNING\|ERROR\)(L/LOG\1(/g'

This was SVN commit r16183.
2015-01-22 20:31:30 +00:00
9407dbe45e Remove useless parameter from CFG_GET_VALUE.
This was SVN commit r15984.
2014-11-17 23:29:49 +00:00
f10bdf5089 Fixes some issues when toggling fullscreen mode with SDL2, refs #2041:
* SDL_WINDOW_RESIZABLE must be set when creating the window, apparently
only fullscreen flags take effect in SDL_SetWindowFullscreen
* Stores window position, so a window can be restored to both its
original position and size, rather than defaults
* Changes initial window position from undefined to centered, it caused
some problems with window positioning returning from fullscreen mode

This was SVN commit r15827.
2014-09-28 22:10:09 +00:00
d62e3729d5 Improves SDL2 support, includes patch by yashi and fabio, refs #2041:
* Adds SDL color cursor implementation
* Adds config option for choosing preferred display in multimonitor
setup
* Uses text input API to better handle CJK input
* Fixes various hotkey and input bugs

SDL 1.2 is still the default and recommended, to test experimental SDL2
support, pass the --sdl2 flag to update-workspaces

This was SVN commit r15767.
2014-09-20 12:12:35 +00:00
7e87211d91 Attempts to fix crash reported on OS X Mavericks by not calling SDL_SetGamma in that case (this patch was included in the A15 bundles), refs #2272
This was SVN commit r14540.
2014-01-08 01:29:04 +00:00
81eabfc934 Fixes basic water rendering on GLES (replaces GL_QUADS with GL_TRIANGLES).
Sets SDL2 to use correct profile for GLES.
Cleans up some old SDL 1.3 version checks.

This was SVN commit r14150.
2013-11-12 01:24:04 +00:00
7a0e91ab23 Fixes undefined behavior in Atlas error display, fixes #2115
This was SVN commit r13808.
2013-09-08 03:35:05 +00:00
161d6c1ba7 Improves SDL 2.0 support
This was SVN commit r13343.
2013-04-05 02:39:30 +00:00
276f0a41a0 New Year's clean-up.
Throw a warning if a invalid (not present) AI is specified in a map.
Replace the last occurences of jubot with qbot.
Exclude the common siege templates from the Units Demo map.
Fix an error with flying units.
Replace CFG_GET_SYS_VAL with CFG_GET_USER_VAL and rename it to
CFG_GET_VAL to reflect its behaviour better.
Fix linker error with clang 3.2. Refs 1588.
Remove some useless includes.

This was SVN commit r13031.
2013-01-01 18:33:53 +00:00
0c233487ec Disables broken window resizing and fullscreen toggling on OS X. Fixes #1381. Refs #741
This was SVN commit r11752.
2012-05-04 23:30:46 +00:00