aboutsummaryrefslogtreecommitdiff
path: root/src/porting.h
AgeCommit message (Collapse)Author
2023-01-23Implement --debugger option to improve UX when debugging crashes (#13157)sfan5
2021-02-24Slap u64 on everything time-y (#10984)Lars Müller
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-05-17Add core.open_url() to main menu API (#8592)rubenwardy
2018-07-22Add a MSVC / Windows compatible snprintf function (#7353)nOOb3167
Use sizeof where applicable for mt_snprintf
2017-08-20Modernize code: very last fixes (#6290)Loïc Blot
Last modernization fixes
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-08-17C++ modernize: Pragma once (#6264)Loïc Blot
* Migrate cpp headers to pragma once
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-11Remove threads.h and replace its definitions with their C++11 equivalents ↵ShadowNinja
(#5957) This also changes threadProc's signature, since C++11 supports arbitrary thread function signatures.
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-07Windows: Skip cmd for release builds (#5416)adrido
2017-03-30Windows: Set window icon (#5486)adrido
2016-08-20Also support X11 icon for minetest copies installed via make install (#4407)est31
Fixes #4323.
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)