aboutsummaryrefslogtreecommitdiff
path: root/src/porting.cpp
AgeCommit message (Collapse)Author
2022-04-08Treat empty XDG_CACHE_HOME same as unsetShadowNinja
This matches the XDG base directory spec.
2022-01-27Request execution on dedicated GPU on Windowssfan5
2022-01-27Enable high-res timers on Windowssfan5
This should fix issues like #11891, caused by the fps limiting code being unable to operate correctly.
2020-12-19Add open user data button to main menu (#10579)rubenwardy
2020-08-23Complete Haiku platform support. (#10311)David CARLIER
Fixing linkage/libraries missing issue. Implements missing platform specifics.
2020-08-20Define environ variable on OpenBSD (#10302)Sebastien Marie
2020-05-24Fix build on FreeBSD, broken since open_urlrubenwardy
2020-05-22MacOS: Fix environ not being foundSmallJoker
2020-05-17Add core.open_url() to main menu API (#8592)rubenwardy
2020-04-27Fix detection of in-place path_locale when RUN_IN_PLACE=0sfan5
broken by 2349d31bae1bfc4d58fd88efbc88261e69b11dad (side effect) fixes #9745
2018-12-11porting.cpp: better minetest support on BSDLoïc Blot
BSD folder detection is pretty raw, just use the same detection as Linux
2018-10-26Windows: Cpack wix installer (#6153)adrido
Create CPack WIX msi Installer for RUN_IN_PLACE=0 builds Correct paths on Windows for RUN_IN_PLACE=0 Install only required font files Games have their own components, and "minimal" is optional
2018-07-22Add a MSVC / Windows compatible snprintf function (#7353)nOOb3167
Use sizeof where applicable for mt_snprintf
2018-05-28Print error when HOME is not set (#7376)Midgard
In some configurations, such as when using the runit supervisor and its tool chpst, the HOME variable might be unset. This resulted in an unclear error message that was hard to pin down.
2017-10-07Replace deprecated WINAPI GetVersionInfoEx (#6496)adrido
* Replace deprecated WINAPI GetVersionInfoEx
2017-08-19Code modernization: src/p*, src/q*, src/r*, src/s* (partial) (#6282)Loïc Blot
* Code modernization: src/p*, src/q*, src/r*, src/s* (partial) * empty function * default constructor/destructor * for range-based loops * use emplace_back instead of push_back * C++ STL header style * Spelling: vertice -> vertex
2017-07-14Dont search for locale folders if gettext is disabled (#6133)adrido
If gettext is disabled, it is defined as 0.
2017-06-26Isolate irrlicht references and use a singleton (#6041)Loïc Blot
* Add Device3D class which will contain IrrlichtDevice interface move getSupportedVideoDrivers to Device3D Add Device3D singleton & use it in various places Rename Device3D to Rendering engine & add helper functions to various device pointers More singleton work RenderingEngine owns draw_load_screen move draw functions to RenderingEngine Reduce IrrlichtDevice exposure and guienvironment RenderingEngine: Expose get_timer_time() to remove device from guiEngine Make irrlichtdevice & scene manager less exposed * Code style fixes * Move porting::getVideoDriverName, getVideoDriverFriendlyName, getDisplayDensity, getDisplaySize to RenderingEngine Fix XORG_USED macro -> RenderingEngine + create_engine_device from RenderingEngine constructor directly * enum paralax => enum parallax
2017-06-06DragonflyBSD & NetBSD build fixLoic Blot
2017-04-28Clean up getTime helpersShadowNinja
This increases size of the getTime return values to 64 bits. It also removes the TimeGetter classes since the getTime functions are now very precise.
2017-04-20Fix various copy instead of const ref reported by cppcheck (part 3) (#5616)Loïc Blot
* Also remove 2 non declared but defined functions * Make some functions around const ref changes const
2017-04-07Windows: Skip cmd for release builds (#5416)adrido
2017-03-30Windows: Set window icon (#5486)adrido
2016-10-03Fix build/warning on non X11 platformsest31
2016-09-30Fix android buildest31
Fixes #4493.
2016-08-20Also support X11 icon for minetest copies installed via make install (#4407)est31
Fixes #4323.
2016-08-03Porting: Fix endless loop if image format is not recognizedest31
2016-07-07Fix warning in porting::setXorgWindowIcon when building without X11 (#4288)Jay Arndt
2016-07-05Finally set a window icon on X11est31
Since the creation of minetest, it had no window icon on X11. Now we have one. The misc/minetest-xorg-icon-128.png file is a rendering of the misc/minetest.svg file with inkscape, created with something like: inkscape -z -e misc/minetest-xorg-icon-128.png -w 128 -h 128 misc/minetest.svg
2016-07-04Fix & make linux conditionals uniform (#4278)Rogier-5
The source used a hodge-podge of different combinations of different macros to check for linux: 'linux', '__linux', '__linux__'. As '__linux__' is standard (Posix), and the others are not, the source now uniformly uses __linux__. If either linux or __linux are defined, it is made sure that __linux__ is defined as well.
2016-06-24Also shut down when SIGTERM was receivedest31
Fixes #4251
2016-02-19Don't print locale directory error message when GetText is disabledShadowNinja
Also, downgrade the error to a warning.
2016-01-03Add MinSizeRel and RelWithDebInfo to MSVCBuildDir checkgregorycu
2015-12-30Fix cache path with RUN_IN_PLACEShadowNinja
If an `XDG_CACHE_HOME` can't be found or `RUN_IN_PLACE` is enabled, `path_cache` is left at its default of `$PATH_USER/cache` (at a time when `PATH_USER` is `..`), rather than being reset to `$PATH_USER/cache` after `PATH_USER` has been properly set.
2015-12-07Add seperate cache pathShadowNinja
This is set to the XDG cache path where possible. It's set to the app's cache path on Android.
2015-11-08Add LuaSecureRandomest31
2015-10-14Use warningstream for log messages with WARNINGShadowNinja
Remove DTIME macro and its uses, too
2015-09-10Improve locale directory detectionest31
Use in-place locale directory if that exists, and static one (RUN_IN_PLACE or CUSTOM_LOCALEDIR) doesn't exist. Report to errorstream if neither static nor in-place locale dirs exist, and report successfully found paths to infostreem. Fixes two bugs: -> Regression of commit [1] where if we use RUN_IN_PLACE=false, but don't make install, locales aren't found. One might think this is no regression, as its no bug, but all other paths (mainmenu, etc.) are detected properly. -> Regression of commit [1] where locales don't work on windows. References: [1]: Commit 645e2086734e3d2d1ec95f50faa39f0f24304761 "Use CUSTOM_LOCALEDIR if specified" by @ShadowNinja
2015-09-06Use CUSTOM_LOCALEDIR if specifiedShadowNinja
2015-08-23Clean up threadingShadowNinja
* Rename everything. * Strip J prefix. * Change UpperCamelCase functions to lowerCamelCase. * Remove global (!) semaphore count mutex on OSX. * Remove semaphore count getter (unused, unsafe, depended on internal API functions on Windows, and used a hack on OSX). * Add `Atomic<type>`. * Make `Thread` handle thread names. * Add support for C++11 multi-threading. * Combine pthread and win32 sources. * Remove `ThreadStarted` (unused, unneeded). * Move some includes from the headers to the sources. * Move all of `Event` into its header (allows inlining with no new includes). * Make `Event` use `Semaphore` (except on Windows). * Move some porting functions into `Thread`. * Integrate logging with `Thread`. * Add threading test.
2015-07-02Fix code style from recent commits and add misc. optimizationskwolekr
2015-04-27Revert the upper-case PROJECT_NAME nonsense that was part of #2402sfan5
2015-04-27Revert "Only lowercase project name at compile time"sfan5
This reverts commit 3be9787e64362b8a5020746220c65abbe31f8097.
2015-04-22Fix crash on startup (Windows)SmallJoker
2015-04-21Only lowercase project name at compile timeShadowNinja
2015-04-20Fix build on OS X (Thanks neoascetic)kwolekr
2015-04-19Porting: Refactor initalizePaths()kwolekr
Add support for Solaris and HP-UX Search additional potential procfs locations for current executable
2015-04-17Fix path detection with --std= parameterest31
Fixes path detection when compilers have been told to follow a standard, e.g. with -DCMAKE_CXX_FLAGS=--std=c++98. To see the passed defines, try this with and without the --std parameter: gcc -E -dM --std=c99 - < /dev/null | grep linux
2015-04-01Move globals from main.cpp to more sane locationsCraig Robbins
Move debug streams to log.cpp|h Move GUI-related globals to clientlauncher Move g_settings and g_settings_path to settings.cpp|h Move g_menuclouds to clouds.cpp|h Move g_profiler to profiler.cpp|h
2015-03-28Add Lua function get_video_modes() for main menuCraig Robbins
Also updates and uses porting::getSupportedVideoModes()