Commit Graph

1609 Commits

Author SHA1 Message Date
4ee7e26776 Add failing test for TraceEntry. Fix TraceEntry.
This was SVN commit r7046.
2009-07-28 10:24:42 +00:00
f5f1d47aed Fix some GCC -Wextra warnings
This was SVN commit r7043.
2009-07-27 18:32:59 +00:00
afcbbc94a7 Fix GCC type warnings
This was SVN commit r7042.
2009-07-27 18:30:22 +00:00
cd0554c6bc Fix Linux build warnings
This was SVN commit r7034.
2009-07-25 20:35:48 +00:00
05d73edd2f # hopefully fix sound error when exiting
as per http://www.wildfiregames.com/forum/index.php?showtopic=12483
thanks to Ykkrosh and oliver!

This was SVN commit r7029.
2009-07-21 18:13:01 +00:00
a866ade2d7 OS X compile fixes
This was SVN commit r7015.
2009-07-18 01:58:16 +00:00
032a41add6 Fix timer configuration: clock_gettime uses timespec, gettimeofday uses timeval.
This was SVN commit r7014.
2009-07-18 01:55:26 +00:00
ae58c456e5 Fix detection of OpenAL string type (closes #268)
This was SVN commit r7013.
2009-07-18 00:30:27 +00:00
78c34c6753 update test to reflect new HeaderlessAllocator min. allocation size
This was SVN commit r7007.
2009-07-17 07:51:14 +00:00
2a0025bc28 # fix warnings and 64-bit bugs in headerless.cpp (workspace update required)
(hopefully fixes often-reported crashes on 64-bit Linux)
remove lib/precompiled.cpp to simplify PCH handling in build system

This was SVN commit r7006.
2009-07-16 23:53:46 +00:00
df36e937f0 Patch from #258: [FreeBSD compat] add some missing includes
This was SVN commit r7001.
2009-07-16 16:53:55 +00:00
663fcfeb9a # macosx compile fix
(OpenAL ALC string definition differs on Windows vs OSX)

This was SVN commit r7000.
2009-07-16 16:48:06 +00:00
a389dd3afa Fix buffer overflow on Linux
This was SVN commit r6996.
2009-07-16 12:35:23 +00:00
ac38db53dd Try again to fix the GL 2.0 function names
This was SVN commit r6987.
2009-07-14 14:06:59 +00:00
e9d99a7eea Fix glCreateShader too
This was SVN commit r6986.
2009-07-14 13:54:57 +00:00
e33f3f5e64 Use the correct names for core shader functions in GL 2.0 implementations
This was SVN commit r6985.
2009-07-14 13:34:31 +00:00
ed0e3097d4 # Fixed build on Linux
This was SVN commit r6921.
2009-06-23 19:46:52 +00:00
c81ec63dee # Fixed Release build on Windows.
This was SVN commit r6920.
2009-06-23 19:46:03 +00:00
d9bb1a7447 remove dbghelp and directx libraries (not redistributable)
move dbghelp and powrprof-specific stuff into external_libraries
dbghelp: dynamically import functions to avoid needing the .lib

This was SVN commit r6912.
2009-06-20 17:50:43 +00:00
9842b8df98 32/64-bit warning drudgery
also ensure off_t is always 64-bit (required at work)

This was SVN commit r6858.
2009-05-05 20:24:06 +00:00
c27365045d 64-bit / big-endian fix (sscanf requires pointer to int)
This was SVN commit r6852.
2009-05-03 11:53:05 +00:00
c4ae6001f9 fix relics of GPL comment insertion (removing empty description comments and in some cases adding new file descriptions)
test_XeroXMB.h: fix warning

This was SVN commit r6851.
2009-05-03 11:47:38 +00:00
1743645fd3 Simplify the overly-complex CppDoc-breaking file headers
This was SVN commit r6832.
2009-04-18 17:51:05 +00:00
214b0e6683 Removed outdated licensing information
This was SVN commit r6831.
2009-04-18 17:17:34 +00:00
c9fa7f13d9 Add GPL header
This was SVN commit r6830.
2009-04-18 17:00:33 +00:00
7a4dd7b473 Set svn:eol-style=native
This was SVN commit r6828.
2009-04-18 16:14:48 +00:00
60f48f558d # infrastructure improvements
make off_t pointer-sized (required for >4gb files at work)
add shared_ptr deleter for free(), add ASSUME_ALIGNED, warning fixes

This was SVN commit r6826.
2009-04-18 08:41:10 +00:00
228859da99 # Fix water-related crash on some video drivers
Detect some errors loading fancy-water fragment shader, and disable
fancy water.
Fixes crash with Mesa on 945GM (which doesn't support fragment shaders,
though it advertises the extensions).

This was SVN commit r6773.
2009-03-24 21:00:41 +00:00
0f3e9cfa72 Avoid load-time dependency on Vista-only API
This was SVN commit r6754.
2009-03-19 23:37:18 +00:00
602e90096b Fixed issue in VerifyPages that was preventing me from compiling on Vista.
#Vista compile fix

This was SVN commit r6650.
2009-01-31 23:30:24 +00:00
d43636f8ae work-related additions:
x86_x64.cpp: detect TLBs (a major undertaking :/)
mem_util: export functions
win.h: hopefully avoid warnings from either vc2008 and vc2005 about
already defined win32 version macros
wnuma: revise large page heuristic (cause of slowdown is now known)

This was SVN commit r6600.
2009-01-06 20:17:06 +00:00
220b05ba08 fix: ignore GetCursorPos failure, which happens when switching desktop (e.g. after pressing ctrl+alt+del)
This was SVN commit r6590.
2009-01-03 18:40:48 +00:00
5228800b73 # Fixed Linux build
Use noncopyable instead of boost::noncopyable. (But maybe this should be
changed to the NONCOPYABLE macro instead?)
Use boost::filesystem::wpath::file_string instead of
external_file_string, since the latter varies between std::string on
Linux and std::wstring on Windows.
Use wcstombs instead of wcstombs_s.
Use rtl_AllocateAligned instead of _mm_malloc.

This was SVN commit r6574.
2009-01-02 21:19:41 +00:00
16ccae10cd # fix warnings
more icc11 fixes - mostly type conversion and noncopyable (now made a
macro)

This was SVN commit r6536.
2008-12-17 16:32:46 +00:00
387722d41e # code cleanup/fixes
improvements from work:
- no longer export classes; instead inline functions where it makes
sense (e.g. the scope timers) or export the member functions directly
- fix icc11 warnings
- add some comments

This was SVN commit r6531.
2008-12-16 21:13:04 +00:00
3da952a036 add missing DLL
move svn_revision stuff to build/svn_revision

This was SVN commit r6529.
2008-12-08 07:34:20 +00:00
12e59fd850 # groundwork for embedding svn revision number into the EXE for debugging
add svnversion from official svn cmdline client distro and its
dependencies
add a horrible batch file that reads its output and writes it to a text
file as a quoted string
(see http://www.wildfiregames.com/forum/index.php?showtopic=12104&hl=)

This was SVN commit r6528.
2008-12-07 22:21:10 +00:00
f7d5711623 additions from work:
add shared_ptr wrapper for numa_allocator and page_aligned_alloc
(removing previous code from shared_ptr.cpp)
pch: add TR1 array
wposix: add setenv
wtime: add strptime

This was SVN commit r6486.
2008-11-20 16:35:30 +00:00
1f065ffb02 fix gcc compile error
This was SVN commit r6461.
2008-11-03 07:46:30 +00:00
c0a5dde4bf jan's modifications
This was SVN commit r6431.
2008-10-18 18:42:23 +00:00
841293ee0a minor improvements from work
This was SVN commit r6419.
2008-10-13 15:08:30 +00:00
34b418e0c1 slight improvement, use ARCH_X86_X64 instead of ARCH_IA32||ARCH_AMD64
This was SVN commit r6411.
2008-09-27 10:23:05 +00:00
aea2368300 fixes to stack trace code under x64 (from work):
- displaying symbol values requires stack pointer, not frame pointer
- update debug_IsPointerBogus
- skip-n-frames code changed to skip-all-frames-up-to-func (more
reliable in the face of inlining)

debug.cpp: cleanup

This was SVN commit r6410.
2008-09-27 10:05:11 +00:00
164f250e5b This was SVN commit r6406. 2008-09-20 18:37:22 +00:00
0f559024db file: for unicode Open function, convert input to UTF8 and delegate to char* version (avoids hacky assignment to m_pathname, and also necessary because _wfopen isn't portable)
secure_crt.cpp: provide implementation of _wfopen_s

SoundGroup: fix: all attributes now have default values in case the XML
file leaves out some fields

This was SVN commit r6405.
2008-09-20 17:42:43 +00:00
c3a42633fa fix stupidly incorrect calculation of smoothed frequency and timer resolution (fixes observed dependence of sim rate on framerate, see http://www.wildfiregames.com/forum/index.php?showtopic=1671)
also improved filtering of the frame delta times.
while at it, improved interface of whrt backends to avoid leaking
implementation details.

This was SVN commit r6401.
2008-09-19 17:56:05 +00:00
33ca85cb4c add additional instrumentation to vsrc_latch to diagnose sound bug (see http://www.wildfiregames.com/forum/index.php?showtopic=11999)
This was SVN commit r6400.
2008-09-18 18:28:14 +00:00
0d79703fb0 wdbg_heap: disable leak reporting to make debug mode bearable
wdbg_sym: numerous fixes and improvements
- all values are (also) displayed in hex form
- more correct calculation of symbol addresses (workaround for apparent
PDB bug)

This was SVN commit r6399.
2008-09-18 18:06:48 +00:00
c4654fd8fa bits: avoid sign conversion warning
debug: cleanup
ogl_tex, tex: use full-width types to avoid truncation warnings
wdbg_sym.cpp: skip __suppress and __profile symbols; add additional hex
display for floats; cleanup
wdll_ver.cpp: cppdoc+cleanup (remove non-reentrant C interface, replace
with std::string)
sysdep: add cppdoc

everything else: flag parameters are now consistently size_t instead of
int (avoids warnings, allows slightly better code on x64)

This was SVN commit r6392.
2008-09-18 11:27:55 +00:00
4132549c2c 64-bit fixes (the parts of lib/ in use at work are now fully operational in 64-bit mode)
- x86_x64.cpp: fix: test ARCH_AMD64 instead of ARCH_IA32 because both
are defined on x64
- manifest.cpp: fix processor architecture
- wdbg_heap.cpp: only enable on ia32
- winit, wstartup: take (lack of) name mangling into account

compiler.h: add STRINGIZE and DECORATED_NAME for use by winit
dir_watch: fix: smart pointers were never actually released due to a
remaining reference

This was SVN commit r6375.
2008-09-16 17:46:45 +00:00
2624069993 replace most BIT macros with a Bit() template for better 64-bit safety
test_bits: add tests for all routines in bits.h
hpet: add safety check
unit.h, bits.h, DOMEvent.h: change T(~0) to ~T(0) (required when T is
64-bit)

This was SVN commit r6335.
2008-09-06 21:15:53 +00:00
c15cbe12d4 now load files from "public" mod unless onlyPublicFiles is on cmdline (see http://www.wildfiregames.com/forum/index.php?s=&showtopic=11983)
instead of checking if the public mod exists, remove the windows-only
wfilesystem assert and another in file_system_posix so that the 'error'
is gracefully handled.

This was SVN commit r6334.
2008-09-06 21:12:36 +00:00
a6499ff319 fix: ensure directory is populated despite multiple Attach operations
refactor: move populate logic to separate file; VfsDirectory now only
provides the realDirectory storage, while Attach() responsibility is
moved to vfs_populate.

This was SVN commit r6333.
2008-09-06 21:09:58 +00:00
14ec3a3026 minor fixes:
whrt: output timer implementation info, fix assert ( 1/(x-epsilon) < 1/x
+ epsilon )
wsdl: fix slightly incorrect gamma values (first and last are now
exactly 0 and 1)

This was SVN commit r6321.
2008-08-10 11:02:25 +00:00
a3b7e8c08c needed unicode at work:
debug: reinstate wchar_t version of debug_printf
  file, waio: add hack to allow creating File_Posix with unicode path
wposix: no longer include some rarely-used stuff to avoid conflict with
3rd party libraries
precompiled: bring boost::bind into global namespace (present in TR1)

dir_watch: needed directory watching with unicode paths and larger
buffers at work, so I completely overhauled and documented this

timer: add ToSeconds

SocketBase: fix to ensure correct match despite ::bind's conflict with
boost::bind

This was SVN commit r6319.
2008-08-09 19:22:13 +00:00
9f909073b4 fixes from work
- file: prevent error when closing a file twice (e.g. close and dtor)
- file_system_posix: export from DLL
- path_util: add some unicode versions of functions
- ia32: robustify, prevent hook reentry due to failure in disassembly,
gracefully handle breakpoints that overwrite code
- wdbg_heap: fix wdbg_heap_Validate

This was SVN commit r6264.
2008-07-21 20:43:37 +00:00
e063542a5f fix memory leak in leak detection code :P
This was SVN commit r6257.
2008-07-19 18:35:33 +00:00
a3fb9051b6 Fix MSVC build errors and warnings
This was SVN commit r6254.
2008-07-19 00:58:34 +00:00
0f9294ce17 Fixed some strict aliasing warnings
This was SVN commit r6252.
2008-07-19 00:36:42 +00:00
fbc3d22720 Use GCC's std::tr1::unordered_* classes instead of the now-deprecated __gnu_cxx::hash_* when possible
This was SVN commit r6250.
2008-07-19 00:20:54 +00:00
0b32d1b674 Fix warning about static_assert being a future (TR1) keyword
This was SVN commit r6249.
2008-07-19 00:13:53 +00:00
fe6370aff8 more dehydra. disabled lockfree module (not in use).
This was SVN commit r6240.
2008-07-17 17:00:00 +00:00
8e86d29301 dehydra fixes (mostly copy-ctor warnings)
This was SVN commit r6239.
2008-07-17 14:23:51 +00:00
3c411dd174 large batch of Dehydra static code analysis fixes
(mostly passing arguments by const reference and checking LibError
return codes)

This was SVN commit r6214.
2008-07-12 10:45:11 +00:00
875260f60a Minor fixes for OSX: stub for debug_set_thread_name, changed name for os_cpu_CallByEachCPU and changed header path for os-sysdeps
This was SVN commit r6207.
2008-07-06 19:52:55 +00:00
3be2bfa7ac OSX implementation of rtl_AllocateAligned
This was SVN commit r6206.
2008-07-06 19:49:27 +00:00
1de82c5efe add cppdoc (and fix a warning in ogl_shader)
This was SVN commit r6204.
2008-07-05 18:46:12 +00:00
ab7cd7a5fa avoid two warnings:
- recompiled enet without /GL and /LTCG because the game's release mode
doesn't include those, either (due to their heavy compile-time impact)
- wdbg_heap: wrap all allocation-hook logic in #ifndef NDEBUG to avoid
unreferenced local function warnings

This was SVN commit r6201.
2008-07-05 09:41:23 +00:00
e14d5be529 timing-related fix (only occurs with certain timer resolutions due to incorrect arithmetic)
frequency_filter wasn't dealing correctly with resolution = 0
.. which was happening due to incorrect cpu_i64FromDouble macros

This was SVN commit r6200.
2008-07-05 08:27:33 +00:00
11b308c347 fix detection of amd64 on VC and avoid 64-bit warning
This was SVN commit r6197.
2008-07-04 19:10:09 +00:00
5b757e536f fix: avoid reentering allocation hook if an error is raised within memory allocators
This was SVN commit r6196.
2008-07-04 18:02:54 +00:00
0d82179d64 add header and include guard
This was SVN commit r6173.
2008-07-02 06:21:06 +00:00
49f0feb969 Fixed Linux build more
This was SVN commit r6168.
2008-07-01 21:43:08 +00:00
58c3b031d6 Partly fixed Linux build
This was SVN commit r6166.
2008-07-01 20:18:05 +00:00
b79375a0c5 color conversion: avoid type punning by returning SColor4ub directly. that required a non-extern-C declaration of the SSE function, so i replaced it with straightforward intrinsics.
ia32: no longer needs #if since build system ensures it's not compiled
on amd64

This was SVN commit r6164.
2008-06-30 19:08:29 +00:00
10a6ef4e17 fix a few remnants of the previous sysdep/win folder location, including a relative path in icon.rc
This was SVN commit r6163.
2008-06-30 18:19:14 +00:00
a3696c0b91 premake: detect processor architecture from script
lib/sysdep: clean up by moving OS and cpu-arch folders into "os" and
"arch" folders

This was SVN commit r6162.
2008-06-30 17:34:18 +00:00
8bb535de75 GL functions have stdcall convention on windows, so that needs to be included in the cast
note that windows build is currently broken - comment out
const size_t CUnit::invalidId;
in Unit.cpp (seems to be a dark corner of the C++ standard, am currently
discussing this with simon)

This was SVN commit r6158.
2008-06-29 21:32:52 +00:00
2382899a87 add system-specific AllocateAligned call (because _mm_malloc isnt as portable as hoped)
("RTL" directly has been added to sysdep - requires update of workspace)

This was SVN commit r6156.
2008-06-29 10:30:33 +00:00
d513f3a579 Fixed logging of boost::basic_path and a type-punned pointer
This was SVN commit r6152.
2008-06-29 09:59:26 +00:00
7d18028fe2 Un-type-pun importExtensionFunctions
This was SVN commit r6151.
2008-06-29 09:54:26 +00:00
91873a66a2 Const-correctness (less compile warnings)
This was SVN commit r6148.
2008-06-28 21:49:14 +00:00
a68d99144b Compile fix for newer versions of GCC (>= 4.3)
This was SVN commit r6144.
2008-06-28 18:51:06 +00:00
67eefaf733 size_t fixes
This was SVN commit r6143.
2008-06-28 18:50:32 +00:00
f2129f70a5 AMD64 assembly modifications for linux
This was SVN commit r6142.
2008-06-28 18:44:06 +00:00
e62deac770 get rid of some instances of type punning (dangerous in the face of aliasing optimizations)
This was SVN commit r6140.
2008-06-28 17:51:18 +00:00
f2037e3dca uint/size_t fixes
This was SVN commit r6139.
2008-06-28 17:31:14 +00:00
26737d624e Indicate load_sys_cursor failed if compiling without system cursor support
This was SVN commit r6138.
2008-06-28 17:28:06 +00:00
9f44f08611 UINT_MAX -> ULONG_MAX to avoid truncating negative 64-bit values into positive 32-bit ones
This was SVN commit r6136.
2008-06-28 17:19:57 +00:00
7d9a366d40 Fixed annoying "unmatched '" warning on gcc
This was SVN commit r6135.
2008-06-28 17:18:33 +00:00
82eb8d355f GCC fix (*(u32*)&float_var confuses gcc)
This was SVN commit r6133.
2008-06-28 17:10:25 +00:00
504ec69508 Fixed some integer type conversion warnings.
This was SVN commit r6130.
2008-06-28 01:09:45 +00:00
ee969c4627 Changed link in error dialog from bugs.wildfiregames.com to trac.wildfiregames.com
This was SVN commit r6125.
2008-06-27 21:32:38 +00:00
0994b71316 fixes
bits: avoid warning, document ceil_log2 corner case
cpu, x86_x64: remove unused cpu_MemoryFence
wdbg_heap: avoid warning
test_bits: fix incorrect test values
TerrainOverlay: fix use of struct vs. class, correct unintended
search&destroy of intended->ssize_tended (LOL)

This was SVN commit r6119.
2008-06-26 20:12:42 +00:00
10237a66c7 GCC/Linux build fixes
This was SVN commit r6107.
2008-06-25 23:01:13 +00:00
129f923cf5 fix: GCC requires emmintrin.h for _mm_mfence
This was SVN commit r6106.
2008-06-25 20:37:25 +00:00
557f08db27 Fix some GCC build issues
This was SVN commit r6103.
2008-06-24 23:28:22 +00:00
e943dbf44b fixes
wsdl: check handles before using, prevent bogus error message due to
stupid MapWindowPoints return value
cursor: robustify, add CppDoc

This was SVN commit r6096.
2008-06-22 11:11:59 +00:00
b478fde5a1 add support for positional sound and "omnipresent" interface sounds
snd_mgr: remove support for sound cones (will not be used); only set
VSrc rolloff factor if relative flag is set
main: hack: flip listener up vector to 'fix' L/R flip (cause is unknown,
coord systems appear to be correct)

This was SVN commit r6092.
2008-06-21 20:06:30 +00:00
a74ffe9a76 wsdl bugfixes:
- robustify gamma ramp calculation, hopefully avoid "invalid parameter"
error message
- fix two mixups of client vs. screen coordinates that caused button
presses to be ignored after moving the window

This was SVN commit r6090.
2008-06-21 18:24:07 +00:00
e364a26a3f fixes:
- Xeromyces filename had been changed to VfsPath but was still being
passed to LOG() without .string().c_str()
- CPUID.4 is "reserved" on AMD, they require a separate codepath for
determining cache parameters.

This was SVN commit r6040.
2008-06-17 18:27:19 +00:00
cf2f61e19a fix Zip archive creation code (note: just the low-level archive code; "vfs_optimizer" is still inoperational)
archive_zip: truncate requires full path; 7-zip apparently relies on
ECDR.m_cd_numEntriesOnDisk
codec: re-enable checksum generation (both explorer and 7-z demand that
CRC be computed)
codec, codec_zlib, stream: wasn't counting the number of output bytes
generated during Finish()

This was SVN commit r6034.
2008-06-16 20:33:47 +00:00
028a92375f fixes from work:
- aligned_allocator.h: use _mm_malloc instead of _aligned_malloc
(somewhat more portable)
bits: fix incorrect handling of bit_mask(0)
- archive_zip.cpp: fix ArchiveWriter_Zip (wasn't opening its output
file, ECDR record wasn't at end of file due to padding)
- io_align.cpp: move routines to header (DLL export)
- wdbg_heap.cpp: avoid crash in report hook if CRT memory block is
invalid

This was SVN commit r6030.
2008-06-16 18:36:36 +00:00
34fec9cb85 preemptive fix: prevent CRT error messages generated after PostQuitMessage from vanishing
This was SVN commit r6005.
2008-06-01 10:19:17 +00:00
5d80d2ee5d fixes+improvements from work:
- add AlignedAllocator - an STL allocator that returns
cache-line-aligned objects (required to avoid RFOs when threads write to
various independent items in a container)
- bits: bit_mask can now be used for N=0..numBits (works around
full-word-shifts-are-undefined issue)
- precompiled.h: remove scoped_ptr, add function-related stuff from TR1
- numa:
  . add numa_IsMemoryInterleaved
  . numa_Allocate is now able to allocate large pages as well (reduces
TLB misses)
- os_cpu: interface change to support 32-bit apps running on WoW64
systems with > 4 GB of memory
- topology: use new x86_x64_EnumerateCaches API; fix detection of cache
ID
- x86_x64: provide the means of enumerating all caches returned by CPUID
and detect L1 cache size

This was SVN commit r6004.
2008-06-01 08:25:12 +00:00
9f3c3df49c fixed logic error in VFS choose-loose-or-archive-file decision (was causing the archive file to be used regardless of whether the loose one was newer or not)
This was SVN commit r5994.
2008-05-31 18:50:39 +00:00
04127c7af3 fixes/improvements to lib code from work
- topology.cpp: modify interface due to thread-safety issue. caller is
now responsible for ensuring the first _Detect call isn't reentered;
everything else is safe.
- fix thread-safety issue in wnuma; use winit mechanism to ensure it's
ready before use
- VFS now takes a cacheSize parameter (required for being able to
disable read-only file caches for the image loader at work)
- allow dynarray that isn't actually holding memory
- debug_stl: VC9 fix (disable this code except on the exact STL version
on which it was tested)
- zlib, lib_api: changes to macro used to toggle between static and
dynamic linking
- add boost filesystem header in external_libraries
- amd64: cpu_ topology functions are now provided by x86_x64
- cpu: remove cpu_ClockFrequency (dangerous, may be tempting to use
during WHRT init which would cause a crash). use x86_x64_ClockFrequency
or os_cpu_ClockFrequency instead.
- werrno: cope with newer boost versions
- wmman: follow SUSv3 in rejecting zero-length mappings

This was SVN commit r5954.
2008-05-13 19:43:02 +00:00
d1a9348b91 major refactor of topology.cpp: each piece of information is detected separately on-demand (reduces coupling and static data)
fix documentation of ceil_log2 relating to input=0
remove os_cpu_SetThreadAffinity (redundant)
wcpu: make max # processors available via os_cpu.h; remove warning if
process affinity is restricted

This was SVN commit r5951.
2008-05-13 05:51:25 +00:00
b429c492ff (hopefully correctly) port the new os_cpu functions to Linux and OSX
the OSX port lacks thread affinity (too complex, can't test), but a link
to the API documentation is included.

This was SVN commit r5946.
2008-05-12 18:38:48 +00:00
ffdff6888d add NUMA and shared-L2-cache detect code (required at work)
enable most of IA-32 specific code to be used in amd64 (resides in
directory lib/sysdep/x86_x64)

bits: add IsBitSet
remove mem_PageSize (use os_cpu_PageSize instead)
cpuid: change interface to allow gracefully supporting later
subfunctions that require input parameters
amd64_asm.asm: add amd64 implementation of cpuid
cpu: move functions provided by OS to sysdep/os_cpu.cpp
cpu topology: avoid trouble when process affinity is set by remapping
processor numbers to 0..PopulationCount(processAffinity)
topology.cpp: move ex-ia32 topology code here.

This was SVN commit r5945.
2008-05-12 18:15:08 +00:00
c0ed950657 had to remove uint and ulong from lib/types.h due to conflict with other library.
this snowballed into a massive search+destroy of the hodgepodge of
mostly equivalent types we had in use (int, uint, unsigned, unsigned
int, i32, u32, ulong, uintN).

it is more efficient to use 64-bit types in 64-bit mode, so the
preferred default is size_t (for anything remotely resembling a size or
index). tile coordinates are ssize_t to allow more efficient conversion
to/from floating point. flags are int because we almost never need more
than 15 distinct bits, bit test/set is not slower and int is fastest to
type. finally, some data that is pretty much directly passed to OpenGL
is now typed accordingly.

after several hours, the code now requires fewer casts and less
guesswork.

other changes:
- unit and player IDs now have an "invalid id" constant in the
respective class to avoid casting and -1
- fix some endian/64-bit bugs in the map (un)packing. added a
convenience function to write/read a size_t.
- ia32: change CPUID interface to allow passing in ecx (required for
cache topology detection, which I need at work). remove some unneeded
functions from asm, replace with intrinsics where possible.

This was SVN commit r5942.
2008-05-11 18:48:32 +00:00
cc243f67eb fixes/improvements made at work:
- fix lots of 64-bit warnings
- round_up/down now templates
- avoid warning with definition of byte swap functions; remove
duplication of that in wsdl
- codec_zlib.cpp: avoid domination warning
- vfs/file_cache: VFS is now responsible for handling zero-length files
(no longer considered an error; just returns zero pointer and size=0)
- cpu: export all functions (thus obviating cpu_memcpy_thunk). this
required renaming asm functions and adding thunk functions that call
them
- winit: fix segment merge statement, reinstate /include (otherwise init
functions are stripped by linker)
- wstartup: VC CRT init section definitions have changed in amd64 build;
match their definition
- wsysdep.cpp: more descriptive text for osError = 0

This was SVN commit r5899.
2008-05-01 15:41:42 +00:00
a915bdc1b6 fix problems related to 64-bit compilation in lib
. dbghelp is now pulled in by a separate external_libraries header
. disable _SECURE_SCL (improves perf)
. amd64: initial implementation of essential functions, not yet complete
. manifest: disabled on ICC because its IPO module incorrectly
interprets /manifestdependency
. wdbg_sym: no longer support stack walks on non-ia32 win2k (avoids
trouble due to mixing SEH and dtors)
. winit and wstartup: had to remove forced symbol include - does not
link otherwise on ICC (for reasons unknown). function pointers are
actually included and called on x64 windows (compiling with MSC)

This was SVN commit r5895.
2008-04-19 18:10:00 +00:00
de9cfc6592 bucket: all routines exported, add bucket_fast_alloc
This was SVN commit r5894.
2008-04-19 17:35:28 +00:00
4dc92352fc vfs_lookup: fix bug when creating physical directories via VFS
CollageManager: avoid creating zero-length files to avoid VFS compaints
test_MeshManager.h now runs correctly without errors/asserts
XMLUtils.cpp: bugfix (pointed out by Philip)

This was SVN commit r5855.
2008-04-05 19:47:57 +00:00
a9fcc1a87c small fixes required by use of lib codebase at work
This was SVN commit r5796.
2008-03-29 18:29:26 +00:00
bc999e00d7 paranoid error checking of pthread mutex functions (safely fails use-after-free requests)
fixes a crash at shutdown after a client has connected

This was SVN commit r5788.
2008-03-25 21:20:43 +00:00
1aa514a6ef fix (i.e. remove) mahaf warnings when running on least-permission account or when running multiple game instances
cpu, timer: fixes for when using lib code from DLL (required for work)

This was SVN commit r5787.
2008-03-24 15:44:37 +00:00
74b4ac19c1 cleanup+fixes; wdbg_heap is now feature complete.
should be safe to distribute this build

code_annotation.h: add our own noncopyable to avoid DLL base class
warning
debug: remove some unicode functions (unnecessary); minor cleanup
debug_stl: disabled
mahaf: do not warn when running as non admin
wdbg: add wdbg_printf and wdbg_assert for use in allocation hook. add
header
wdbg_heap: now feature complete.
. allows storing 3..4 frames from the call stack with 0 space overhead.
. prevents garbage file/line output.
. takes care of allocation counting (previously done by profiler)
wdbg_sym.cpp: cleanup+fixes (locking, wdbg_*)

fix: properly specify __declspec(dllimport) for certain classes

This was SVN commit r5679.
2008-02-25 21:19:52 +00:00
df3198ce1e fix massive inefficiency in write_buffer (allocating new buffer each time)
This was SVN commit r5611.
2008-02-09 18:57:59 +00:00
871c71317c # fix filesystem bugs that prevented screenshots from being written
This was SVN commit r5600.
2008-02-05 07:40:57 +00:00
0201229520 Fixed build on Ubuntu.
This was SVN commit r5584.
2008-01-26 04:43:02 +00:00
58360a629c - fix incorrect use of block vs. sector aligned (both offset and length must be block-aligned to allow proper caching)
- use helper functions to reduce occurrences of BLOCK_SIZE and
SECTOR_SIZE
- wmi: provide for shutting it down (gets rid of its two threads); only
initialize if actually needed (costs 200ms)
- ogl_tex: don't complain if there's no gfx_card info (due to not having
used wmi)

This was SVN commit r5572.
2008-01-20 21:52:54 +00:00
aebf8cbf68 fix VFS bug preventing directories from being created:
- vfs_lookup: currentPath was of wrong type; simplified and fix create
logic
- archive_zip: fix: correctly handle filenames with /
- vfs: remove workaround for above bug
- io: temporarily disable block caching (works around problem with zip
file created by 7z)

add and use new wdbg_heap module (WIP)
remove mmgr

This was SVN commit r5571.
2008-01-20 16:53:09 +00:00
1700e90a15 fix VC9 warning*, update some comments, remove old VC6 workarounds
* http://www.wildfiregames.com/forum/index.php?showtopic=11479&hl=

This was SVN commit r5564.
2008-01-19 11:44:41 +00:00
9269be9ee3 remove mmgr and macros that redefine malloc/new/free
(see http://www.wildfiregames.com/forum/index.php?showtopic=11450&hl= )

clean up debug module
. no longer include platform-dependent header (-> less rebuilds)
. DISPLAY_ERROR -> DEBUG_DISPLAY_ERROR
. parts of config.h that don't affect all files moved to config.2 (->
fewer full rebuilds)
. remove creaky symbol cache (no longer needed for mmgr)
. remove TLS thread naming stuff (can use debugger's thread window
instead; no need for platform independence there)

wdbg: remove thread suspension and breakpoint APIs (not needed)

acpi: fix: u64 -> uintptr_t

wutil: fix WinScopedLock, use that instead of direct lock() functions

misc:
. get rid of SAFE_STRCPY, replace with strcpy_s
. remove _getcwd (shouldn't be used)

This was SVN commit r5563.
2008-01-19 11:33:11 +00:00
4df9e47976 wsdl: add WS_ flags mentioned as required by MSDN (even if it worked before)
wsdl: add note on deadlock in ChoosePixelFormat
ScriptGlue.cpp: timer.cpp no longer provides Seconds(), so remove that.

This was SVN commit r5549.
2008-01-14 21:04:55 +00:00
f4da60b0d9 timer: display clocks instead of seconds if using rdtsc (avoids needing cpu_ClockFrequency on linux, which isn't currently implemented; also avoids differing results due to CPU freq throttling)
tex: minor formatting

This was SVN commit r5547.
2008-01-13 11:25:19 +00:00
8e341c2d6b shared_ptr: use Philip's idea of making the Deleter's operator() a template instead of its enclosing class. in code, use DummySharedPtr() instead of passing a DummyDeleter
h_mgr: compile fix for windows memory tracker (see forum thread)
timer: add assert to catch incorrect behaviour as reported by philip

This was SVN commit r5544.
2008-01-10 19:29:52 +00:00
5d50893c00 Fixed h_mgr crash on Linux
This was SVN commit r5541.
2008-01-10 00:50:05 +00:00
607094333a Added ArrayDeleter for shared_ptr(new[])
This was SVN commit r5540.
2008-01-08 23:38:52 +00:00
e1e9ba150c additional linux fix (hopefully): "add" sscanf_s
This was SVN commit r5538.
2008-01-07 20:07:05 +00:00
a859562ea7 improvements and fixes:
- properly differentiate between buffer/offset alignment and length
alignment (relevant since block size has been increased to 256k)
- use VfsPath for most game paths instead of CStr
- clean up timer interface and implementation
- self-tests no longer crash
- file_cache.cpp: fix for the case where allocation fails (prevent
deleter from seeing a null pointer)
- allocators: move all shared_ptr-related stuff to its own component;
add DummySharedPtr
- codec: disable checksums (important for performance at work)
- File: made into an interface class to avoid export problems. not
entirely sure about this..
- vfs_path.h, path.h, os_path.h: proper fix for using
fs::change_extension and similar utility functions with derivatives of
basic_path
- lib_api: automatically link against import lib if building lib/ as a
DLL
- path_util: remove unused functions (this component is deprecated)
- compiler.h: add INLINE
- Xeromyces.cpp: pass PIVFS so that GetXMBPath works in self-test
(should do this mostly everywhere rather than have one singleton g_VFS)

This was SVN commit r5537.
2008-01-07 20:03:19 +00:00
3273a8425c Partial Linux build fixes
This was SVN commit r5536.
2008-01-07 15:32:32 +00:00
2c2a394a1e Fixed allocators.h reference. Fixed repeated warning in GCC.
This was SVN commit r5535.
2008-01-07 02:06:27 +00:00
ad55f9f1bc pending improvements and partial fixes to self-tests
fix: g_frequencyFilter is now in globals.cpp instead of in main (since
other modules access it and main.cpp isn't included in the self-test)
fix: globals.h now avoids dragging sdl.h into other projects
allocators: got rid of references to the old master header (must now
include the specific header, e.g. dynarray.h)

This was SVN commit r5534.
2008-01-03 22:07:18 +00:00
9cea581f43 config: add means of enabling/disabling wsdl (and cautionary note about SDL on windows)
wsdl: fix mouse trouble related to shutdown, use wmi instead of ddraw,
disable low-level kbd hook (not needed), cleanup

This was SVN commit r5533.
2007-12-29 16:45:22 +00:00
6c99218ce1 forgot to add this file :S
This was SVN commit r5528.
2007-12-23 12:56:40 +00:00
2bffecb331 h_mgr: fix: ModuleInitState wasn't set => shutdown didn't happen => leaked a lot of memory
sysdep/win: save-last-error logic now wrapped in a scoped class (avoids
need for "goto exit")

This was SVN commit r5527.
2007-12-23 12:20:37 +00:00
8667ea74c8 fixes and improvements
- directoryPosix: replace most methods with boost filesystem (but not
all: the latter cannot efficiently enumerate files AND query their
size/mtime)
- AllocatorChecker: better name for member functions
- file: move the File class here
- trace: bugfix
- io: move UnalignedWriter to write_buffer.cpp (basically the same
thing)
- vfs: remove unnecessary "vfs" warts from variable names
- vfs_tree: VfsFile now stores single Name/Size/MTime fields instead of
the FileInfo record (less clunky)
- vfs_path: use boost filesystem's version of the basename/extension
functions
- lf_alloc: remove (no longer necessary, won't be finished - not worth
the trouble)
- path_util: remove path_foreach_component (replaced by better path
traversal logic) and PathPackage (obsoleted by fs::path)

! resource loading code now receives VfsPath as its filename. there is
also OsPath (native absolute path) and Path (relative to binaries/data)

- tex is now independent of file loading code; it just en/decodes
in-memory buffers
- wdll_ver: clean up, use smart pointer to simplify bailout code
- wsdl: remove nonexistent failure path from calc_gamma (cruised by here
because SDL_SetGamme is failing once after a cold boot at work)
- wsnd: simplify OpenAL DLL search, use boost::filesystem
- wutil: Wow64 redirection is now packaged in a (RAII) class

This was SVN commit r5525.
2007-12-22 18:15:52 +00:00
d10b4851e2 fix: "config.h" should be "lib/config.h" (not sure why VC finds the files even though they are in different directories)
This was SVN commit r5522.
2007-12-21 08:17:20 +00:00
63086f4e26 part3: now functional file loading code (not entirely finalized)
(too many changes to list..)

moved tex_* files to lib/tex
archive builder and hotloading modules are disabled.\

This was SVN commit r5518.
2007-12-20 20:14:21 +00:00
2e5d9452aa part2: misc source/lib fixes/improvements
move all except user-specified config choices out of config.h and into
appropriate headers
CPU_IA32 -> ARCH_IA32
wsdl: disable use of ddraw (will soon be replaced by WMI)

use shared_ptr without namespace qualifier (it's in tr1)
debug_warn -> debug_assert(0)
LIB_API to allow building as DLL
smart pointers: reduce use of .get()
cache_adt: use map instead of hash_map (avoids needing a hashCompare
class). also remove spurious warning
code_annotation.h: better cassert implementation
move FPS measuring portion of timer.cpp into frequency_filter
move include of memory headers into mmgr.h (to avoid errors, we must
ensure they are included if mmgr is used)
posix_filesystem.h: move definition of mkdir to wfilesystem
stl: disable iterator checks in release mode
wmi: fix COM init bug, use smart pointers
wutil: add code to get DLL module handle (if compiled as such), add
WinScopedLock
timer: fix handling of raw ticks

This was SVN commit r5517.
2007-12-20 20:09:19 +00:00
b00ac7e5b5 fix to ia32_Generation (unfortunately, things are not as simple as querying the CPU family).
this hopefully fixes lag problems michael is seeing because rdtsc is
being used on his 7-th gen athlon (which was falsely reported as 6th gen
by the old version of this code)

This was SVN commit r5510.
2007-12-10 21:32:38 +00:00
75ab906315 WIP file code, getting pretty close to functional
archive: ArchiveEntry now a mememto and not exposed directly
typedefs for boost::shared_ptr
fixed up dir_util to new interface
add "FileProvider" that does Load/Store and indicates Precedence

vfs: structure has changed. one RealDirectory per OS dir; vfs_tree
stores it; populate uses it to Add() stuff to vfs_tree; lookup does path
traversal and calls populate

This was SVN commit r5499.
2007-12-01 18:32:43 +00:00
ea96aa6b89 bucket: remove size optimization that causes warnings
path_util: add path_IsDirectory and path_split
wdbg_sym.cpp: bugfix for non-IA32 codepath

This was SVN commit r5498.
2007-12-01 18:23:28 +00:00
317f98a6c0 WIP of new file code
archive: pretty much done except for trace and archive_builder
IO: io_manager still needs to be fixed/revised (especially WRT buffer
and alignment management)
posix: done
vfs: need to complete vfs_mount and tie it in to vfs.cpp
dir_util: needs further revisions (VFS interface changed since then)

This was SVN commit r5475.
2007-11-20 18:51:07 +00:00
d19a2cba65 include boost smart pointers from PCH
factor out the "atom_fn" mechanism into lib/allocators/string_pool.cpp
factor out FAT date/time handling into lib/fat_time.cpp
path_util: replace strcpy with SAFE_STRCPY; add additional functions
that avoid passing an output buffer via StringPool

This was SVN commit r5474.
2007-11-20 18:44:36 +00:00
e3d8592fa2 current version of archive interface (for review purposes)
This was SVN commit r5451.
2007-11-10 19:39:26 +00:00
0636b65228 mem: update comment
renderer, WaterManager: remove unnecessary header

This was SVN commit r5450.
2007-11-10 18:45:17 +00:00
c057dd8f10 wdir_watch.cpp: change header
wgfx: robustify gfx_get_video_mode
wfilesystem: update comments
wsnd: update comments to reflect use of readdir, not layer on top
remove test_allocators (has been replaced by tests/ in lib/allocators)

This was SVN commit r5449.
2007-11-10 17:59:47 +00:00
084ba8fcb0 cache_adt.h: add peek() routine, move CacheEntry to global scope.
config: add read-only cache option
debug: fix error code
input: remove dependency on file header
lockfree: add LF_ReferenceCounter

This was SVN commit r5448.
2007-11-10 17:47:25 +00:00
0095685b71 fix issues with HeaderlessAllocator (incorrect list insertion order, document a known limitation of the allocator). green bar
This was SVN commit r5447.
2007-11-10 17:43:02 +00:00
05cadb76a8 problems with self-test: partial fixes, disabled the currently failed tests
(it's possible they are exposing the bug causing cacheAllocator to fail
on linux)

This was SVN commit r5446.
2007-11-10 14:07:50 +00:00
23a1c6196f incorporate allocators/ into build
the old lib/allocators.h is now a bridge to the new headers (temporary)
make slight interface changes in lib/res/file to match new allocators
interface

This was SVN commit r5445.
2007-11-10 13:55:32 +00:00
11081d8e36 fix: update-workspaces is picking up the self-tests in this "branch", so rename the test dirs
This was SVN commit r5444.
2007-11-10 13:47:43 +00:00
149ebb67c0 add WIP file code to a new folder (not included in the build)
This was SVN commit r5443.
2007-11-10 13:39:45 +00:00
abc8edceeb delete the correct files this time..
This was SVN commit r5442.
2007-11-10 13:34:13 +00:00
954ff35810 comedy of errors: deleted in the wrong place -.-. reverting changes from that revision..
This was SVN commit r5441.
2007-11-10 13:33:28 +00:00
e6dd9f1f1b these files were mistakenly copied from lib/res/file to lib/file; that revision can't be reverted, so delete.
This was SVN commit r5440.
2007-11-10 13:29:54 +00:00
267eac33b5 This was SVN commit r5439. 2007-11-10 13:15:03 +00:00
e8f6fe7172 move allocators here (the old cache_allocator is now in headerless.cpp)
This was SVN commit r5438.
2007-11-10 13:13:36 +00:00
41d3ef5fa5 Fix compile on GCC 4.1, where the ArraySize function trick did not work.
This was SVN commit r5418.
2007-10-17 07:36:12 +00:00
ddffdba2c3 Changed console character to a _ since the vertical line glyph didn't seem to be available on OS X.
This was SVN commit r5415.
2007-10-13 18:22:20 +00:00
277ed33da6 # OS X fixes.
- Networking no longer tries to use IPV6, ignoring the family type of
CSocketAddr. This address will be replaced when we switch to ENet
anyway.
- The name of the Atlas semaphore now also includes a timestamp, since
the RNG generated the same sequence of names for multiple runs of the
game, causing problems if the games crashed and leaked semaphores, and
making debugging painful.
- get_executable_name now also works if the game is within an app bundle
(useful for packaging it more nicely later on, and since wxWidgets
expects us to be in an app bundle).

This was SVN commit r5407.
2007-10-11 08:00:05 +00:00
46dd72de18 # Fixed STL debug compile errors on GCC.
This was SVN commit r5406.
2007-10-11 07:55:24 +00:00
0841404218 fix debug_stl for vc8; refactor/simplified implementation
This was SVN commit r5396.
2007-10-09 17:05:05 +00:00
677fa0518f # osx/parallels compat, fix UNC path issue
fix hack that prevented proper handling of absolute (UNC) paths

This was SVN commit r5395.
2007-10-09 17:03:39 +00:00
ee0c58dbc2 fixes for the relocated res/file/archive stuff (adjust include paths)
also moved vfs_optimizer into archive directory

This was SVN commit r5389.
2007-10-06 07:45:15 +00:00
62568fda28 archive: make decompressor more robust.
archive_builder: move logic into a Compressor functor. avoid direct
dependency on ZLib
compression: add provision for calculating checksum

Xeromyces: remove no longer needed zlib.h

This was SVN commit r5388.
2007-10-03 11:57:11 +00:00
7421fa79ba move archive-related files to their own directory (res/file was way too cluttered.. vfs will probably also be separated.)
This was SVN commit r5387.
2007-10-03 09:48:45 +00:00
8a92304b25 better ARRAY_SIZE macro that refuses to compile when passed a pointer.
this prevents bugs along the lines of the recently reported
StringStripper issue.

This was SVN commit r5381.
2007-10-01 19:12:59 +00:00
89bf2e609a Fix crash bug in CPU detection (used sizeof pointer instead of strlen)
This was SVN commit r5380.
2007-09-29 17:09:13 +00:00
ea65a2ad8e Picking up the pieces (part 1)
This was SVN commit r5376.
2007-09-26 05:30:57 +00:00
82ef7fe089 cleanup
- malloc+error checking -> new
- better callback parameter name consistency (ctx -> cbData)

file_io: replace another manual malloc+free with shared_ptr
wclipboard: robustify _get as well

This was SVN commit r5372.
2007-09-25 10:43:11 +00:00
f997c03028 add cppdoc documentation for compression
ucsize -> usize etc.

This was SVN commit r5371.
2007-09-25 10:06:02 +00:00
f4adce44bf cleanup:
- callbacks now have a uintptr_t "cbData" parameter (instead of
haphazard void*/uintptr_t, cb/ctx/data)
- resource loading code now more uniformly deals with u8* pointers
instead of void*

allocators: add support for page_aligned_alloc via boost::shared_ptr.
add evil hack to avoid the need for default ctor and ensure alignment in
SingleAllocator
archive: improve Decompressor
compression:
. near complete rewrite (previous code was a poorly factored mess)
. fix bug related to buffer allocation
. no longer provide get_output API (prone to abuse)
. add call to get max. size of output buffer (for preallocation)

This was SVN commit r5370.
2007-09-25 09:39:20 +00:00
3f9b020169 hopefully bring linux and MacOS X into line with the newly refactored sysdep interface.
This was SVN commit r5367.
2007-09-23 16:15:46 +00:00
7a5655edde # major refactoring of system-dependent code (simplifies build system)
cpu.cpp: avoided the need for wrapper functions by calling the
OS-specific function directly (declared in central header, implemented
in the platform's cpp file)

avoid the need for init in cpu and ia32 via if(!init) Init() pattern.

optimized memcpy now requires SSE support

remove error-prone CAS macro; replace with cpu_CAS
config: no longer require inline asm for float->int conversions
lib_error: remove special-case in CHECK_ERR for windows (no longer
needed)

This was SVN commit r5365.
2007-09-23 15:36:29 +00:00
56bd5b59b4 sysdep cleanup:
- factor cursor and clipboard out of sysdep.h
- remove empty sysdep.cpp
- wcpu: remove profiler code (it's in wprofiler.cpp if we ever need it)
- robustify clipboard code
- wsysdep: move code to determine app window into wutil; it's now used
by the clipboard code

This was SVN commit r5364.
2007-09-23 10:15:28 +00:00
b776e58c67 use (newly added) cpu_PageSize instead of sysconf (avoids a critical order dependency on windows)
refactored sysdep code:
- avoid many #if OS_xxx.
- remove bsd.cpp, merge its contents with osx
- move linux-specific parts of unix/ into linux/

This was SVN commit r5363.
2007-09-23 08:05:38 +00:00
3f58951808 arg parsing code: wasn't properly handling "
This was SVN commit r5337.
2007-09-08 08:37:30 +00:00
5383eff15c implement the previously mentioned cmdline params
qpc: refactor IsSafe

This was SVN commit r5336.
2007-09-08 08:09:32 +00:00
f039e1ce76 fix error path for acpi/mahaf failures (attempt#2)
prevent using mahaf if it's going to fail anyway
module_init: add ModuleIsError (allows acpi and mahaf init routines to
pass failure notification on to their second and later callers)

counter: safer memory management

This was SVN commit r5333.
2007-09-07 20:17:57 +00:00
94456a218a # bugfix for ACPI init on Win2k
mahaf: add API to check whether physical memory mapping ought to work
acpi: no longer consider itself initialized if the above is not true
(fixes undue warning in PMT and possibly HPET about invalid ACPI table
on Win2k)

cpu: remove redundant include

This was SVN commit r5329.
2007-09-05 21:29:33 +00:00
efd08a21f9 Use #if instead of #ifdef to detect HAVE_X.
This was SVN commit r5323.
2007-09-03 23:32:16 +00:00
264f394f17 Moved X11 stuff out of unix/ folder, added osx/ sysdep folder, corresponding premake.lua changes, and a few misc other Mac OS X-related changes
This was SVN commit r5320.
2007-09-03 12:56:45 +00:00
f5a2a141dc Fixed non-PCH compiles.
Removed a few global variables from Atlas.
Added call to srand(time).
Restored NotebookEvent in wxJS.
Fixed CPU-detection in Valgrind.

This was SVN commit r5318.
2007-09-02 23:38:58 +00:00
22e4d2fd98 # win/macosx compat, add hooks to disable OpenGL feature usage
config: add 2 parameters to allow disabling s3tc/auto mipmap gen
wpthread: add support for named semaphores (required for macosx compat)
openal, ogghack: remove direct use of __APPLE__ macro (replace with
OS_MACOSX)
GraphicsSetupHandlers.cpp: fix incorrect usage of OS_ macros (they're
always defined, so the test should be if their value is != 0)

This was SVN commit r5316.
2007-09-02 21:44:56 +00:00
a22e73406a Fixed Linux build
This was SVN commit r5314.
2007-09-02 17:18:45 +00:00
08d3ff2952 Updates for OS X and gcc 4.0 compatibility.
- Fixed some invalid member function references in wxJS code that gcc
4.0 didn't like.
- Some conversion changes.
- Don't try to construct wxSound from memory in OS X (it's not
available).
- Added dependency on zlib in AtlasUI (something there uses _compress).
- Added Mac code for finding current executable's path.
- Added dummy code for getting display size that does not use X.
- Fixed dir_get_changed_file stub to return ERR::AGAIN (end of files)
instead of INFO::OK.

This was SVN commit r5312.
2007-09-02 16:50:20 +00:00
bdd1d93c8f whrt: made asserts a tad bit more numerically robust, for what it's worth.
Erik had reported that the PMT counter indicates a resolution > 2ms; i
cannot see a legitimate reason for this happening :S (compiler bug?
debugger bug? bad memory?)

This was SVN commit r5301.
2007-08-25 16:38:36 +00:00
84e4e5aa12 POSIX doesn't really specify _SC_NPROCESSORS_CONF, so add a sysdep routine for that. ia32 now uses it, which is one more step towards unbreaking macosx. thanks to ali for the report :)
This was SVN commit r5300.
2007-08-25 16:32:00 +00:00
Seth
7da9830ebe Modified line 92 to
if ! OS_UNIX || OS_MACOSX since, the previous OS_UNIX check only did not
work

This was SVN commit r5289.
2007-08-09 16:12:46 +00:00
4ac699d021 # fix: ACPI code now safely handles concurrent memory accesses
This was SVN commit r5273.
2007-07-25 19:16:00 +00:00
805736cb8f # system detect fixes
simplify detect code by adding support for WMI (the "proper" way to do
things)
wutsname: fix incorrect reporting of windows version

ps/Util: add note on exception that is raised on Wow64 (Windows bug)

This was SVN commit r5213.
2007-06-24 13:24:40 +00:00
12ac1deebd wposix: add sysconf support for number of "processors"
ia32: add note on when ia32_ApicId fails; support detecting/guessing
processor topology from number of "processors" (hopefully fixes warning
on Philip's PIII system)

This was SVN commit r5209.
2007-06-23 12:59:21 +00:00
dc40e831d4 profile: bugfix (cpu.h atomic functions require intptr_t)
slight improvements to aken (declare code segment as pageable)

This was SVN commit r5202.
2007-06-17 10:29:28 +00:00
63732eda21 wsdl: redirect stdout to file during early init as requested by philip (now possible, and prevents losing printfs that come before SDL_Init)
This was SVN commit r5182.
2007-06-15 21:58:24 +00:00
529727d02b slight improvement to aken: retry mapping if someone has mapped the same page with unexpected cacheable attributes
This was SVN commit r5181.
2007-06-15 21:36:55 +00:00