336 Commits

Author SHA1 Message Date
yvt
8f33b1482c
Merge pull request #1007 from devnexen/pref_gen
Use `SDL_GetPrefPath` to determine the user resource directory

`SDL_GetPrefPath` takes care of different conventions for user-specific
data paths used by some platforms, such as Haiku.
2022-06-20 00:18:00 +09:00
yvt
8f763deca2 Fix missing path separator when XDG_DATA_HOME is given
The user resource directory should be `$XDG_DATA_HOME/openspades/
Resources`, not `$XDG_DATA_HOME/openspadesResources`.
2022-06-19 23:51:51 +09:00
yvt
7e3037b1e3 Don't lie that userDataDirectory holds the value of XDG_DATA_HOME 2022-06-19 23:49:45 +09:00
yvt
a7fe1d2f72 Rename the variable xdg_data_home to userDirectory
It doesn't hold the value of `XDG_DATA_HOME` in the end, so it's
inappropriate to name it `xdg_data_home`.
2022-06-19 23:46:02 +09:00
yvt
d628dd170a Reformat 2022-06-19 23:39:22 +09:00
yvt
e658d0be71 Call SDL_free on the pointer returned by SDL_GetPrefPath 2022-06-19 23:37:59 +09:00
David Carlier
b539f2f728 V-Sync new submenu proposal.
disabled or plain mode, maybe adaptive mode can be considered at some point.
2022-04-16 15:00:30 +01:00
yvt
e6d1856b3d
Merge pull request #1002 from devnexen/download_data_adjust
Display the package manager download progress only if the progress information is available
2022-04-10 15:51:46 +09:00
yvt
826ca93ddf
Merge pull request #997 from devnexen/solarish_port
Porting for Solaris-based systems
2022-04-10 15:48:44 +09:00
David Carlier
872d6fe7b8 data directory more abstract for BSD/Haiku... 2022-04-02 15:44:15 +01:00
David Carlier
e18efdde50 download package manager update display progress only when there is download occuring 2022-03-18 05:04:17 +00:00
David Carlier
66e7ee9f8d package manager update proposal.
logging progress.
2022-02-18 19:33:41 +00:00
David Carlier
40b128abcc solaris based systems port.
V-Sync operation unsupported by the driver and pretty rudimentary grep.
mostly linkage fixes otherwise.
2022-02-13 08:56:24 +00:00
David Carlier
d51217e5e1 dragonflybsd identification. 2022-02-12 16:23:23 +00:00
yvt
18f8b77c4a feat(gui): indicate the usage of a pre-release version in the startup window 2021-05-03 00:38:12 +09:00
yvt
b1022213f3 Merge branch 'master' into patch-modernize 2021-05-02 23:39:03 +09:00
yvt
31dbe3649d Implement temporal AA
Fixes #597.

Currently, reprojection is done by taking only the camera rotation into
account. The result is not very satisfactory.
2021-01-08 21:28:19 +09:00
yvt
cb5f0d9284
fix: remove any remaining references to cg_smp
Fixes #923.
2020-12-17 00:39:23 +09:00
David Carlier
d69b75f83e Backporting Angelscript Haiku support fix.
Fixing segfault on OpenGL extensions listing.
2020-08-31 17:09:17 +00:00
David Carlier
191124ddb7 Haiku support. 2020-07-28 19:03:50 +00:00
dtomlinson-ga
fefce1b4e0 Fix use after free in Main.cpp (issue #846) (#871)
* Fix use after free in Main.cpp (issue #846)

Create c-string to store filepath before concatenating with output message.

* Fix use after free in Main.cpp

Changed variable type to std::string and moved c_str() call

* Fix use after free in Main.cpp

Removed reference to directory variable
2019-11-30 00:56:45 +09:00
YVT
33d920a540
Fix compilation issue with MSVC
This commit fixes a compilation issue caused by the use of an incomplete type
`FontManager` in an instantiation of `Handle<FontManager>::~Handle()`.

Fixes #852.
2019-10-04 00:13:05 +09:00
YVT
ffb3f33abe
Remove a redundant assignment
Reported by Clang's static analysis.
2019-07-24 18:12:08 +09:00
yvt
da7e61b25c
Change std::regex static local variables to global
Removes the runtime cost caused by lazy initialization.
2019-07-23 22:25:12 +09:00
yvt
701105f916
Change the return type of file opening functions to std::unique_ptr<_>
This also fixes a memory leak in `MainScreenHelper::SaveFavorites`.
2019-07-23 22:14:10 +09:00
yvt
a2eff8fda5
Update Bitmap
- Added doc comments to all of its methods.
- `Bitmap::Load` methods now returns `Handle<Bitmap>`.
- `Bitmap::Load(IStream *)` now accepts `IStream &`.
- `Bitmap::{GetPixel, SetPixel}` now perform bounds checking in release
  builds.
2019-07-23 19:31:24 +09:00
yvt
b9a5d80f7b
Use Handle::New to construct T <: RefCountedObject
Unless `T::T(Args...)` is inaccessible from `Handle::New`, in which case
`Handle::Handle{new T(args...), false}` should be used.
2019-07-20 17:01:04 +09:00
yvt
29ac869491
clang-format 2019-07-20 16:40:59 +09:00
yvt
5f0814988a
Use make_unique to construct unique_ptr 2019-07-20 16:40:52 +09:00
yvt
6e262ea6ec
Add stmp::make_unique
This template function is a polyfill of `std::make_unique`, which is
unavailable in GCC 4.9 (should we even be supporting this old thing?).
2019-07-20 16:17:10 +09:00
yvt
60fd3191c5
Remove Handle::operator T*(), discouraging conversion to raw pointers
It was replaced by `Handle::GetPointerOrNull()`. Every use of
`GetPointerOrNull` should be reviewed. Some of them were already removed.
2019-07-20 15:47:42 +09:00
yvt
797dbd755f
Do not initialize 3D before displaying "NOW LOADING"
Fixes the regression introduced by `ConsoleScreen`.
2019-07-15 00:22:30 +09:00
yvt
abcf65d536
Add clearsfxcache console command 2019-07-15 00:08:02 +09:00
yvt
2a1c28d7d1
Add cleargfxcache console command 2019-07-14 23:58:46 +09:00
yvt
bb4675ca00
Add help console command 2019-07-14 23:34:40 +09:00
yvt
a9561991c3
Add savemap console command 2019-07-14 22:29:15 +09:00
yvt
d0dfb188f0
Remove unnecessary code 2019-07-14 22:06:58 +09:00
yvt
8f12984882
Hide unrecognized config variables from autocompletion 2019-07-14 21:31:26 +09:00
yvt
8616b5b509
Get the config variable autocompletion working 2019-07-14 20:36:56 +09:00
yvt
dd071637d6
Fix MergeConsoleCommandCandidates 2019-07-14 20:36:27 +09:00
yvt
1634c61512
Expose the command name autocompletion to the script 2019-07-14 19:51:30 +09:00
yvt
e4efc8b5fc
Autocomplete config variables 2019-07-14 19:15:30 +09:00
yvt
bfe746abca
Remove C++20 constructs 2019-07-14 18:41:13 +09:00
yvt
e57e9655dd
Implement console-related methods on MainScreen 2019-07-14 18:32:42 +09:00
yvt
93cccdecf9
Add View::AutocompleteCommandName 2019-07-14 18:29:50 +09:00
yvt
0ade4b6356
Add console commands for accessing config variables 2019-07-14 17:43:04 +09:00
yvt
f4f9dce529
Add #pragma once 2019-07-14 17:26:19 +09:00
yvt
6b415aa7d4
Redirect SPLog to the console window 2019-07-14 16:02:07 +09:00
yvt
cacec5b470
Invoke View::ExecCommand from the console window 2019-07-14 14:59:58 +09:00
yvt
bb7c84b2c2
Add View::ExecCommand 2019-07-14 14:31:51 +09:00