Commit graph

31 commits

Author SHA1 Message Date
dhewg
cdeb7e7ff2 Get rid of Sys_GetProcessorString()
This was only used for a printf() and not implemented for all
the platforms we can now run on.
We also don't want to force a CPU type on Windows.
2018-08-20 01:46:29 +02:00
dhewg
975cda1637 Unify CPUID_FTZ and CPUID_DAZ
Get rid of the 2 CPUID flags and combine them with SSE in one
implementation.
SSE flags can now be set on all x86 and x86_64 platforms -
independent of -ffast-math.
Helper defines borrowed from STREFLOP.
2018-08-20 01:46:29 +02:00
dhewg
57b8d55db0 Get rid of unused CPUID flags 2018-08-20 01:46:29 +02:00
dhewg
a9e31c4225 Get rid of Sys_GetClockticks() and Sys_ClockTicksPerSecond()
Now unused.
2018-08-20 01:46:29 +02:00
dhewg
d26cf44a29 Add GetMilliseconds to idSys
To be used for the overhauled idTimer in idlib/.
2018-08-20 01:46:29 +02:00
dhewg
ae551ee106 Port Sys_Milliseconds() to SDL
Sync with SDL and use unsigned int as return type.
Code outside of sys/ still uses signed ints to store the result.
2018-08-20 01:46:29 +02:00
dhewg
9101f2e5a0 Port Sys_Sleep() to SDL 2018-08-20 01:46:29 +02:00
dhewg
f1a7b426fe Port all thread related functions to SDL
Setting thread priorities has been dropped (it is not portable).
The background download thread now exits gracefully.
g_threads is not public anymore.
2018-08-20 01:46:29 +02:00
dhewg
3c2c603cf4 Move MAX_THREADS as define to BuildDefines.h 2018-08-20 01:46:29 +02:00
dhewg
efbd47f4bc Port critical sections and events to SDL
Use SDL mutexes and conditions.
One new critical section CRITICAL_SECTION_SYS for events.
2018-08-20 01:46:29 +02:00
dhewg
f41d2347b1 Use SDL for everything endian 2018-08-20 01:46:29 +02:00
dhewg
4df3236c3e Adapt structs for easy forward declarations
Get rid of the tag namespace.
2018-08-20 01:46:27 +02:00
dhewg
8f4d16fd1b Move BuildDefines.h include to platform.h 2018-08-20 01:46:27 +02:00
dhewg
7a40472c5b Include cstddef for ptrdiff_t in platform.h 2018-08-20 01:46:27 +02:00
dhewg
487406d861 Move idlib typedefs to platform.h 2018-08-20 01:46:27 +02:00
dhewg
e522e719dd Move common includes from precompiled.h to platform.h 2018-08-20 01:46:27 +02:00
dhewg
7d52a803ab Split platform specific code from precompiled.h
New header sys/platform.h.
2018-08-20 01:46:27 +02:00
dhewg
c1d67445c3 Remove Sys_LoadOpenAL() and Sys_FreeOpenAL()
This is not required anymore, all binaries on all platforms
either link against OpenAL or use the stub.
2018-08-20 01:46:27 +02:00
dhewg
2b446ddd28 Basic infrastructure to build with MinGW
Add WIN32 support to CMake (core and games, no dedicated for now).
Only use MFC when it is available.
2018-08-20 01:46:26 +02:00
dhewg
0b0db9ab41 Remove the unused and useless CallStack code
This was never enabled and only implemented for Windows.
2018-08-20 01:46:26 +02:00
dhewg
25929447dc Change return type of [Sys_]GetProcessorId to int
Fixes compile error: invalid conversion from 'int' to 'cpuid_t'
2018-08-20 01:46:26 +02:00
dhewg
8585be83f9 Get rid of GL_HARDLINK, always link against libGL
This kills the funky GL logging stubs, which unnecessarily
complicates the build process (think future cmake).
As for logging GL calls: Use apitrace for that
https://github.com/apitrace/apitrace
2018-08-20 01:46:25 +02:00
dhewg
c011a0f72a Fix and cleanup endianess defines
Use various defines set by the compiler to determine the
endianess of the target arch.
2018-08-20 01:46:25 +02:00
dhewg
18e8dc4dc6 Basic infrastructure to build on *BSD 2018-08-20 01:46:25 +02:00
dhewg
670f2f2be8 Fix platform dependent thread function definitions
Thread return types are different between platforms, and its
probably not a good idea to return something of a different size,
cast the callback and expect it to not crash.
2018-08-20 01:46:25 +02:00
dhewg
17dd12384c Fix shared library loading for x86_64
Library handles are "void *" on posix.
2018-08-20 01:46:24 +02:00
dhewg
ba1adc839f Trivial pointer cast fixes for x86_64 2018-08-20 01:46:24 +02:00
dhewg
66c740b405 Basic infrastructure for native x86_64 builds
Let scons link directly in the build folder.
Multiple archs can coexist next to each other.
New scons variable "X86" to cross compile x86 binaries on x86_64.
2018-08-20 01:46:24 +02:00
dhewg
c7c187e4dc Fix all whitespace errors
Excluding 3rd party files.
2018-08-20 01:46:22 +02:00
dhewg
eac3112d2d Fix quoting in GPL headers 2018-08-20 01:46:21 +02:00
Timothee 'TTimo' Besset
aa3dbca015 hello world 2011-11-22 15:28:15 -06:00