Commit Graph

57 Commits

Author SHA1 Message Date
Peter Nelson 4eaeccdaeb
Codechange: Introduce FioRemove() to remove files. (#12491)
New function FioRemove() handles OTTD2FS conversion, and uses std::filesystem::remove instead of unlink, all in one location.
2024-04-14 23:43:50 +01:00
Peter Nelson 332cbca36e Codechange: Pass std::string_view from drivers instead of char *. 2024-04-10 22:02:04 +01:00
Rubidium c9276c2959 Codechange: replace x.size() == 0 with x.empty() 2023-10-20 23:05:43 +02:00
Rubidium d4c2043294 Codechange: remove a number of unneeded c_str() calls 2023-06-15 22:14:45 +02:00
Patric Stout 0e56a73fb8
Fix: disable hardware acceleration when GPU driver crashed the game last attempt (#10928) 2023-06-04 14:40:17 +00:00
Rubidium 0ab7bc7a2b Codechange: use fmt::format to create type prefixed driver names 2023-06-02 18:05:41 +02:00
Rubidium 07860e67e2 Codechange: use fmt::format_to to format the help message 2023-05-20 16:50:03 +02:00
Peter Nelson e6740046ee Codechange: Use range-for iteration. 2023-05-11 07:58:55 +01:00
Rubidium 68ff3fd062 Change: include fmt.h C++ headers in stdafx.h
This to prevent compilation issues between runs with and without precompiled
headers. Also remove the headers from the rest of the code base as they are
not needed there anymore, although they do relatively little harm.
2023-05-08 16:49:23 +02:00
Rubidium 86786a7af6 Codechange: introduce StrEqualsIgnoreCase/StrCompareIgnoreCase to replace strcasecmp 2023-04-29 10:25:25 +02:00
Rubidium f74e26ca7e Codechange: replace error/usererror printf variant with fmt variant and rename 2023-04-25 17:55:09 +02:00
rubidium42 55a11710a6 Codechange: convert printf DEBUG statements to fmt Debug statements 2021-06-13 12:45:45 +02:00
Patric Stout fece1c57ca
Codechange: Suppress warnings when asserts are disabled (#8917) 2021-04-01 11:16:19 +02:00
Patric Stout b93d7dd3cb
Add: Option to (dis-)allow accelerated video drivers. (#8819)
The video drivers using the OpenGL backend are currently our only
accelerated drivers. The options defaults to off for macOS builds and
to on everywhere else.

Co-authored-by: Michael Lutz <michi@icosahedron.de>
2021-03-08 15:42:39 +01:00
Michael Lutz 37bc2f8064 Codechange: Use std::string in the driver and blitter selection code. 2020-05-21 20:02:34 +02:00
S. D. Cloudt 13cc8a0cee Cleanup: Removed SVN headers 2019-11-10 17:59:20 +00:00
glx 9195f2337a Codechange: use std::vector for _resolutions 2019-04-18 21:49:34 +02:00
Henry Wilson 7c8e7c6b6e Codechange: Use null pointer literal instead of the NULL macro 2019-04-10 23:22:20 +02:00
rubidium 05f7df39ce (svn r26539) -Fix [FS#5994]: [Windows] Crash due to assuming (formerly) _video_driver is being set before the operating system has time to perform the first "paint" callback 2014-04-28 21:09:19 +00:00
rubidium b476086c39 (svn r26538) -Codechange: remove double accounting of the drivers 2014-04-28 21:06:51 +00:00
rubidium 9ed12b0f07 (svn r26509) -Codechange: replace strdup with stredup (the latter ensures the return is not NULL) 2014-04-25 15:40:32 +00:00
rubidium 0463dbdc9e (svn r26482) -Codechange: add an include that allows us to undefine/redefine "unsafe" functions to prevent them from being used, and thus having to care about certain aspects of their return values 2014-04-23 20:13:33 +00:00
rubidium 6996b441d9 (svn r26107) -Codechange/cleanup: remove some coding bloat and simplify the driver factory instatiations 2013-11-25 14:26:46 +00:00
rubidium 7fd1e1df81 (svn r23198) -Codechange: introduce a free that takes const pointers so we don't need to cast to void/non-const before being able to free 2011-11-12 13:00:29 +00:00
michi_cc c575b5bbd7 (svn r23000) -Feature: Base graphics sets can now specify a preferred blitter which OpenTTD uses to decide which blitter to load. 2011-10-04 21:35:47 +00:00
rubidium 428044e033 (svn r22407) -Document: the "root" driver related stuff 2011-05-01 20:04:09 +00:00
rubidium 485c7cd99e (svn r22397) -Document: some tidbits of the blitter code 2011-05-01 10:15:33 +00:00
frosch ed4f806f1d (svn r20283) -Codechange: Unify start of doygen comments. 2010-08-01 19:22:34 +00:00
rubidium 34764feac2 (svn r20186) -Codechange: remove VARDEF from _realtime_tick and _rightclick_emulate 2010-07-19 16:21:49 +00:00
rubidium 82fc28f77f (svn r18809) -Codechange/Cleanup: remove unneeded headers from some files, if a header require a header make it include that header 2010-01-15 16:41:15 +00:00
smatz 5c2fb2f8c1 (svn r17690) -Fix: minor coding style issue 2009-10-04 14:49:39 +00:00
rubidium e8ddf001c8 (svn r17570) -Fix: a number of Doxygen warnings about missing parameters, which were sometimes missing and sometimes just typos 2009-09-19 09:51:14 +00:00
rubidium 7fbc33dae1 (svn r17248) -Fix: add GPL license notice where appropriate 2009-08-21 20:21:05 +00:00
rubidium 65191b077d (svn r16702) -Change: don't implicitly fall back to the null/dedicated (video) drivers, but show an error message that no driver could be found. You can still explicitly start the null drivers thought. 2009-06-30 16:20:16 +00:00
rubidium 0d99b6c71c (svn r16421) -Codechange: do not unnecessarily remove constness or unnecessarily add it. 2009-05-24 20:29:04 +00:00
smatz 0d3f5e6e74 (svn r15299) -Cleanup: remove many redundant includes 2009-01-31 20:16:06 +00:00
rubidium 11da45ee55 (svn r14949) -Cleanup: pointer coding style 2009-01-10 00:31:47 +00:00
peter1138 45f1d83bc7 (svn r14908) -Codechange: Add support for text parameters. 2009-01-08 11:40:42 +00:00
peter1138 6b6fd36050 (svn r14907) -Codechange: Remove 32 character limit from driver/blitter selection and parameters. 2009-01-08 11:06:07 +00:00
rubidium 0d254e8914 (svn r14540) -Codechange: introduce [v]seprintf which are like [v]snprintf but do return the number of characters written instead of the number of characters that would be written; as size_t is unsigned substraction can cause integer underflows quite quickly. 2008-10-28 14:42:31 +00:00
smatz 61847389d6 (svn r13619) -Codechange: use 'const char *' instead of std::string for blitter and driver names
Removes indirect dependency on <string> for 20 files, reduces binary size by 16kB
2008-06-24 09:15:45 +00:00
smatz 2299181c4b (svn r13537) -Fix [FS#2090](r13523): QSortT won't work this way, use Dimension instead of uint16[2] for resolutions 2008-06-16 19:38:41 +00:00
smatz dc5ceacd77 (svn r13462) -Codechange: move DriverFactoryBase destructor definition from header file (saves ~16kB) 2008-06-11 12:46:28 +00:00
glx ee256e770a (svn r13390) -Codechange: introduce usererror() for fatal but not openttd related errors. Now all error() will 'crash' openttd after showing the message in win32 releases (MSVC), creating a crash.log and crash.dmp (like the '!' hack used before). On the other hand, usererror() will just close the game. So use error() only when it can be helpful to debugging, else use usererror(). 2008-06-05 20:54:52 +00:00
smatz ed462507b2 (svn r13351) -Codechange: disable warnings about unused variable for builds without asserts 2008-06-01 15:08:14 +00:00
rubidium d03994098b (svn r12971) -Documentation: add @file in files that missed them and add something more than whitespace as description of files that don't have a description. 2008-05-06 15:11:33 +00:00
smatz c0a5fa9eea (svn r12594) -Codechange: move large functions from driver.h to driver.cpp to reduce binary size and compile time 2008-04-06 16:49:02 +00:00
rubidium 3ca95f2a85 (svn r11839) -Codechange: move some variables from variables.h to a more logical location. 2008-01-13 21:41:24 +00:00
rubidium a3ccdcea36 (svn r11777) -Codechange: split the string header and make do not include it when it's not necessary. 2008-01-07 14:23:25 +00:00
rubidium 429521a7d1 (svn r11692) -Codechange: move some functions from 'functions.h' to a more logical place and remove about 50% of the includes of 'functions.h' 2007-12-25 11:26:07 +00:00