Commit Graph

73 Commits (master)

Author SHA1 Message Date
Lars Müller b5eda416ce
Slap u64 on everything time-y (#10984) 2021-02-24 12:05:17 +01:00
rubenwardy 664f5ce960
Add open user data button to main menu (#10579) 2020-12-19 13:27:15 +00:00
David CARLIER cf5547227d
Complete Haiku platform support. (#10311)
Fixing linkage/libraries missing issue.
Implements missing platform specifics.
2020-08-23 15:39:32 +02:00
rubenwardy a9c3a42323
Add core.open_url() to main menu API (#8592) 2020-05-17 19:09:10 +01:00
nOOb3167 9537cfd3f8 Add a MSVC / Windows compatible snprintf function (#7353)
Use sizeof where applicable for mt_snprintf
2018-07-22 21:56:06 +02:00
Loïc Blot ae9b5e0098 Modernize code: very last fixes (#6290)
Last modernization fixes
2017-08-20 19:37:29 +02:00
Loïc Blot 7528986e44 Code modernization: src/p*, src/q*, src/r*, src/s* (partial) (#6282)
* 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-19 14:25:35 +02:00
Loïc Blot 921151d97a C++ modernize: Pragma once (#6264)
* Migrate cpp headers to pragma once
2017-08-17 22:19:39 +02:00
Loïc Blot b3a36f7378 Isolate irrlicht references and use a singleton (#6041)
* 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-26 20:11:17 +02:00
ShadowNinja 6c5e5e2023 Remove threads.h and replace its definitions with their C++11 equivalents (#5957)
This also changes threadProc's signature, since C++11 supports arbitrary
thread function signatures.
2017-06-11 09:43:05 +02:00
ShadowNinja b662a4577d Clean up getTime helpers
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-28 14:43:18 -04:00
adrido 676951d90d Windows: Skip cmd for release builds (#5416) 2017-04-07 07:14:39 +02:00
adrido cc1ff26c3f Windows: Set window icon (#5486) 2017-03-30 20:28:37 +02:00
est31 f092dac979 Also support X11 icon for minetest copies installed via make install (#4407)
Fixes #4323.
2016-08-20 21:26:44 +02:00
est31 5d4d3f8366 Finally set a window icon on X11
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-05 17:02:06 +02:00
Rogier-5 1dfd977ec4 Fix & make linux conditionals uniform (#4278)
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-07-04 21:00:57 +02:00
Pavel Puchkin 83583aa2d5 Fix OSX building issue caused by ad884f2 2016-01-29 10:54:50 -05:00
Auke Kok 4ac1e9bccb Clocksource: use a better clock if available.
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.
2016-01-29 00:58:08 -05:00
ShadowNinja ea2964f5a1 Add seperate cache path
This is set to the XDG cache path where possible.
It's set to the app's cache path on Android.
2015-12-07 13:51:41 -05:00
est31 ad5ac39d8d Add LuaSecureRandom 2015-11-08 15:57:15 -05:00
ShadowNinja 645e208673 Use CUSTOM_LOCALEDIR if specified 2015-09-06 11:21:26 +02:00
Pavel Puchkin 588f0c1fb0 Fix building on OSX, broken since "Clean up threading"
Commit

e4bff8be94 - Clean up threading

by @ShadowNinja has broken the OSX build.

Including things inside a namespace isn't good.

Also fixes #3124.
2015-09-06 05:34:02 +02:00
ShadowNinja e4bff8be94 Clean up threading
* 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-08-23 22:04:06 -04:00
Loic Blot e6f0178e83 Little coding style fix on porting.h 2015-07-10 19:04:05 +02:00
kwolekr 386d695330 Porting: Refactor initalizePaths()
Add support for Solaris and HP-UX
Search additional potential procfs locations for current executable
2015-04-19 16:52:58 -04:00
Craig Robbins 2430b2e998 Add Lua function get_video_modes() for main menu
Also updates and uses porting::getSupportedVideoModes()
2015-03-28 13:26:03 +10:00
Markus Koschany cfca5f99e6 Fix FTBFS on GNU/Hurd platform
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-11 15:59:58 +10:00
kwolekr 43f102271d Create minidump on fatal Win32 exceptions
Remove software exception translator function, simplifying exception handler
macros.  FatalSystemExceptions are left unhandled.
2015-02-02 01:39:17 -05:00
kwolekr 976d0b2caa Reorganize supported video driver query mechanisms 2015-01-18 13:24:25 -05:00
kwolekr 8661b3587b Set WM_CLASS window hint for Xorg 2014-12-15 13:52:10 -05:00
ShadowNinja c4e393deea Simplify loading of Android version of menu 2014-11-20 15:37:20 -05:00
sapier 1cc40c0a7c Add support for Android 2.3+
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-29 18:17:56 +02:00
Martin Doege c410e9182d OS X compatibility fixes 2014-06-29 17:27:33 +02:00
sapier 003634e049 Add support for exiting formspecs by doubleclicking outside 2014-06-12 23:15:05 +02:00
sapier 32ab6c2a32 Revert "Add daemon support for linux like operating systems"
Remove daemon support due to delayed popular vote (part 2)
2014-06-01 14:54:21 +02:00
sapier 34904a0744 Add daemon support for linux like operating systems 2014-05-31 23:48:06 +02:00
ShadowNinja 31f9912e9e Fix setThreadName support for BSD 2014-05-26 15:20:06 -04:00
sapier 1838a3fd69 Add support for dpi based HUD scaling
Add support for (configurable) multiline hotbar
Improved screensize handling
Add userdefined gui scale by BlockMen
2014-04-27 21:53:13 +02:00
FessWolf 9b142157b0 Fix argument type of the RaiseException() function 2014-04-23 15:39:33 -04:00
ShadowNinja c00ed9dac3 Add support for threadnames on BSD, Windows (MSVC-only), and OSX 2014-04-19 02:02:11 -04:00
Sfan5 d436502fa4 Fix problem with newer MinGW runtimes 2014-04-14 20:09:42 +02:00
sapier 8bb8602c25 Fix broken win32+bsd build 2014-04-11 21:45:30 +02:00
sapier edcad09dee Add support for named threads (atm linux only) 2014-04-09 21:32:21 +02:00
kwolekr a0683b811c Define strlcpy on platforms that do not have it 2014-02-09 13:57:29 -05:00
kwolekr 2a01050a0c Add capability to read table flag fields from Lua API 2014-02-09 12:44:31 -05:00
kwolekr 83bafbe08b Make flag strings clear specified flag with 'no' prefix
Remove flagmask field from set_mapgen_params table
Add small bits of needed documentation
2014-02-08 17:50:59 -05:00
Sfan5 cd7e8372f3 Include system info in the HTTP user agent on Windows 2014-01-23 22:27:13 +01:00
Kahrl 4e1f50035e Omnicleanup: header cleanup, add ModApiUtil shared between game and mainmenu 2013-08-14 21:03:33 +02:00
proller f960c3be31 Add support for IPv6
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-06-23 11:31:22 +04:00
kwolekr df49b93877 Add varying levels of precision to TimeTaker 2013-03-29 16:53:15 -04:00