aboutsummaryrefslogtreecommitdiff
path: root/src/porting.h
AgeCommit message (Collapse)Author
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-01-29Fix OSX building issue caused by ad884f2Pavel Puchkin
2016-01-29Clocksource: use a better clock if available.Auke Kok
clock_gettime() is a far better clock than gettimeofday(). Even better than clock_gettime() is that you can select either CLOCK_MONOTONIC, or even CLOCK_MONOTONIC_RAW. These clocks offer high precision time. And the _RAW variant will never roll back due to NTP drift or daylight savings, or otherwise. I've adjusted this code to select the right clock method auto- matically based on what's available in the OS. This means that if you're running a very old linux version, MacOS or other, you will automatically get the best clocksource available. I've tested all Linux clocksources by selectively compiling and running a 10k+ timer test suite. In all cases I confirmed that the 3 POSIX Linux clocksources worked properly, and were selected properly. I've modified the OS X compile path to use the high-res clock source for all time functions, but I can't confirm it works or that it compiles. As for WIN32, I confirmed that the used clocksource is indeed a Monotonic clocksource, so good news: that code section appears to be exactly what it should be.
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-09-06Use CUSTOM_LOCALEDIR if specifiedShadowNinja
2015-09-06Fix building on OSX, broken since "Clean up threading"Pavel Puchkin
Commit e4bff8be94c0db4f94e63ad448d0eeb869ccdbbd - Clean up threading by @ShadowNinja has broken the OSX build. Including things inside a namespace isn't good. Also fixes #3124.
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-10Little coding style fix on porting.hLoic Blot
2015-04-19Porting: Refactor initalizePaths()kwolekr
Add support for Solaris and HP-UX Search additional potential procfs locations for current executable
2015-03-28Add Lua function get_video_modes() for main menuCraig Robbins
Also updates and uses porting::getSupportedVideoModes()
2015-02-11Fix FTBFS on GNU/Hurd platformMarkus Koschany
Minetest fails to build on GNU/Hurd due to a name clash with OSX/Apple, both are defining the __MACH__ keyword. This commit fixes the issue.
2015-02-02Create minidump on fatal Win32 exceptionskwolekr
Remove software exception translator function, simplifying exception handler macros. FatalSystemExceptions are left unhandled.
2015-01-18Reorganize supported video driver query mechanismskwolekr
2014-12-15Set WM_CLASS window hint for Xorgkwolekr
2014-11-20Simplify loading of Android version of menuShadowNinja
2014-06-29Add support for Android 2.3+sapier
There have been plenty of ppl involved in creating this version. I don't wanna mention names as I'm sure I'd forget someone so I just tell where help has been done: - The partial android versions done by various ppl - Testing on different android devices - reviewing code (especially the in core changes) - testing controls - reviewing texts A big thank you to everyone helping this to be completed!
2014-06-29OS X compatibility fixesMartin Doege
2014-06-12Add support for exiting formspecs by doubleclicking outsidesapier
2014-06-01Revert "Add daemon support for linux like operating systems"sapier
Remove daemon support due to delayed popular vote (part 2)
2014-05-31Add daemon support for linux like operating systemssapier
2014-05-26Fix setThreadName support for BSDShadowNinja
2014-04-27Add support for dpi based HUD scalingsapier
Add support for (configurable) multiline hotbar Improved screensize handling Add userdefined gui scale by BlockMen
2014-04-23Fix argument type of the RaiseException() functionFessWolf
2014-04-19Add support for threadnames on BSD, Windows (MSVC-only), and OSXShadowNinja
2014-04-14Fix problem with newer MinGW runtimesSfan5
2014-04-11Fix broken win32+bsd buildsapier
2014-04-09Add support for named threads (atm linux only)sapier
2014-02-09Define strlcpy on platforms that do not have itkwolekr
2014-02-09Add capability to read table flag fields from Lua APIkwolekr
2014-02-08Make flag strings clear specified flag with 'no' prefixkwolekr
Remove flagmask field from set_mapgen_params table Add small bits of needed documentation
2014-01-23Include system info in the HTTP user agent on WindowsSfan5
2013-08-14Omnicleanup: header cleanup, add ModApiUtil shared between game and mainmenuKahrl
2013-06-23Add support for IPv6proller
Two new configuration options are added: - "enable_ipv6" to enable/disable the overall use of IPv6 - "ipv6_server" to enable/disable the use of IPv6 sockets when running a server (when "enable_ipv6" is enabled)
2013-03-29Add varying levels of precision to TimeTakerkwolekr
2013-02-25Fix build on Windowskwolekr
2013-02-25Fix most walled-off caveskwolekr
2013-02-25Tune queue limits, some other adjustmentskwolekr
2013-02-25Add multi-Emerge thread supportkwolekr
2013-02-24Update Copyright YearsSfan5
2013-02-24Change Minetest-c55 to MinetestPilzAdam
2013-02-06Add flag string settings, flat map optionkwolekr
2013-01-23Fix compile under MingWkwolekr
2013-01-21Fix compile on certain Linux configurations, reduce spawn point heightkwolekr
2013-01-21Last set of minor cleanupskwolekr
2012-06-17Optimize headersPerttu Ahola
2012-06-05Switch the license to be LGPLv2/later, with small parts still remaining as ↵Perttu Ahola
GPLv2/later, by agreement of major contributors
2012-03-10Initial directory structure reworkPerttu Ahola
2011-11-29Move images to data/textures and fix some path stuff; hope that installation ↵Perttu Ahola
still works