Commit Graph

911 Commits

Author SHA1 Message Date
Gregory Hainaut b282909c9e common: avoid silly compiler warning due to define redefinition
comma was updated in plugings (due to clang reformat)
2016-09-08 19:20:24 +02:00
Gregory Hainaut 1a8825b374 pcsx2|common|gsdx: use empty() instead of .size() ==/!= 0 check
Enhance readability reported by clang tidy
2016-08-21 17:20:13 +02:00
Jonathan Li c9a1097579 console: Remove buffered and wxerror console writers
Both haven't been used for a long time, and don't seem to hold any
advantages over the default stdout console writer.
2016-08-17 22:07:42 +01:00
Gregory Hainaut bf0e5dc5bd Merge pull request #1516 from PCSX2/emitter-manual-void-cast
pcsx2: manually cast function pointer to void*
2016-08-17 18:56:55 +02:00
Gregory Hainaut 19ceea4f1e Merge branch 'strict-aliasing' 2016-08-17 18:53:08 +02:00
Gregory Hainaut cc68776069 pcsx2: manually cast function pointer to void*
Templace is nicer but give a hard time to compiler.

New version compile in both gcc&clang without hack

v2: add an uptr cast too for VS2013 sigh...
v3: use an ugly function pointer cast to please VS2013
2016-08-17 09:53:30 +02:00
Gregory Hainaut 44bbdbe49d common: use free directly instead of an Alloc(0)
Easier to understand the intent. And avoid false positive in coverity
2016-08-15 15:51:22 +02:00
Gregory Hainaut 2700f06fe7 Merge branch 'pcsx2-verbose-thread-error' 2016-08-14 22:31:28 +02:00
Gregory Hainaut 9d8135cf1c x86emitter: allow strict aliasing optimization 2016-08-14 21:01:40 +02:00
Gregory Hainaut 2cc98191f0 common: allow strict aliasing optimization 2016-08-14 21:01:40 +02:00
Gregory Hainaut e8e66ec4b5 x86emitter: use memcpy to avoid aliasing issue
Code is only called once anyway.
2016-08-14 20:48:45 +02:00
Gregory Hainaut 5ad4cbace7 onepad|common: fix GCC warning type limit 2016-08-12 19:30:14 +02:00
Gregory Hainaut 078577c7c5 common: try to print a nice error message when pthread_create is bad 2016-08-12 10:05:14 +02:00
Jonathan Li af60501fb6 windows: Remove unused solution files and property sheets
The solution files are unused and for ancient Visual Studio versions -
GSDumpGUI has its own solution file, and bin2cpp is included in the main
solution file.

The property sheets have either fallen out of use or were never used in
the first place.
2016-08-04 23:09:08 +01:00
Jonathan Li ed47dca8a1 x86emitter:windows: Make cpu detection/affinity 64-bit compatible
Use DWORD_PTR since that works on both 32-bit and 64-bit builds. And
remove some empty unused functions.

Fixes a 64-bit compilation issue.
2016-07-24 19:05:18 +01:00
Jonathan Li f04dfe43a8 utilities:windows: Restrict memcmp_mmx to 32-bits
Fixes a 64-bit compilation issue.
2016-07-23 10:52:09 +01:00
Jonathan Li ac7e7a79c3 utilities:windows: Remove memset32 assembly
It's unused, and it doesn't compile in 64 bits.
2016-07-23 02:21:21 +01:00
Jonathan Li 768ed80ece utilities:threading:windows: Use intrinsic pause
Fixes a 64-bit compile error.
2016-07-23 02:21:13 +01:00
Gregory Hainaut 5cf2688c0c common: remove useless x86_intrin.h
Yeah one less licence in the project :)
2016-07-22 18:47:51 +02:00
Gregory Hainaut 7d35e15fea Merge pull request #1444 from PCSX2/atomic-relax
Atomic relax
2016-07-22 18:36:02 +02:00
Jonathan Li f8605dda61 common|pcsx2: Tidy/standardise VS project
Combine all the different configurations together so the project files
are more generic and maintainable.

Also standardise the layout so all the project files will be similar and
all have the same standard elements (even if empty).

Add 64-bit configurations.
2016-07-19 23:25:12 +01:00
Jonathan Li 7277074d9e windows: Fix incremental linking property sheet
Don't use "-dbg" target suffix - both Devel and Debug builds use the
property sheet, so it's incorrect.

Also don't set optimise references to false - it's incompatible with
incremental linking and causes compile failures.
2016-07-19 23:25:12 +01:00
Lena 5a17b95901 x86_intrin.h: fix build using GCC (#1468)
__GNUG__ is not defined while compiling this file,
this causes the build to fail.

Replacing this with __GNUC__ fixes this.
2016-07-19 23:13:24 +01:00
Gregory Hainaut 6e306ee44f common: move _xgetbv with cpuid intrin
Besides, code comes from Gabest and not reactOS
2016-07-17 10:25:00 +02:00
Gregory Hainaut e872552fdc spu2x|common: s/jASSUME/pxAssume/ allow to remove code and __debugbreak intrinsic 2016-07-17 10:24:29 +02:00
Gregory Hainaut c56ca4a0fa common: include cpuid.h on unix
I tested both clang and gcc.
2016-07-17 10:24:29 +02:00
Gregory Hainaut 10ea05bc6f common: remove old atomic wrapper
Use cross-platform std::atomic instead
2016-07-14 18:29:41 +02:00
Gregory Hainaut 812e41d578 common: relax atomic of m_IsBeingDeleted
Avoid the memory fence in the constructor
2016-07-14 18:29:41 +02:00
Gregory Hainaut ca46921796 MTVU: use acquire/release semantics for atomic operation
* Avoid the generation of memory barrier (mfence)
* Based on the fact that it used to work on previous code without any
  barrier

v2:
* keep basic code in reset path
* use relaxed access for isBusy. The variable doesn't carry load/store
  dependency but is instead an hint to optimize semaphore post
2016-07-14 18:29:40 +02:00
Akash 72661e7c16 PCSX2-Core: Clean up some warnings on MSVC
x86emitter : Convert variable type from u8 to bool.
recVTLB: Cast "sign" to bool to prevent a warning.
R5900OpcodeImpl: Cast all the values in array to u64 instead of s64.
2016-06-30 16:49:18 +05:30
Jonathan Li 79d019b5bb utilities: Don't use TLS buffers in FastFormatString classes (#1430)
The TLS buffers used by the FastFormatUnicode and FastFormatAscii
classes seem to be responsible for PCSX2 not terminating properly on
Windows under certain conditions (using MTVU before commit
1111e03901, using CDVDgigaherz without a
disc, possibly other conditions).

When PCSX2 shut downs and the FastFormatBuffers are being cleaned up,
the call to pthread_key_delete() would end up calling
WaitForSingleObject(e, INFINITE) and waiting indefinitely for an event
to trigger. It never does get triggered (for reasons unknown) and
therefore PCSX2 doesn't terminate properly.

Remove the usage of TLS buffers in the FastFormatString classes - it
fixes the termination issue on Windows and doesn't seem to have much
effect on performance.
2016-06-29 13:13:51 +01:00
Jonathan Li 3904c67e6e utilities: Use Bind instead of Connect 2016-06-17 00:03:58 +01:00
Jonathan Li c10728319b utilities: Use Bind compatible event declarations/definitions 2016-06-16 23:49:34 +01:00
FlatOutPS2 f1ba9c9d6a PCSX2-WX: MainFrame keyboard navigation improvement (#1388)
Adding shortcuts to all the menu options, that only some of the options
in the Config tab already had.

Also update translations so menus are still localised (well, mostly).
2016-06-08 21:48:16 +01:00
Jonathan Li 7c205d7a1e windows: Don't use __declspec(dllexport) for plugin exports
Using __declspec(dllexport) causes duplicate export warnings to be
generated when compiling 64-bit builds. Name mangling also occurs on
functions that are exported this way, so it doesn't actually work with
the plugin system, which uses unmangled names.

The module definition file exports the functions without name mangling
and is sufficient on its own.
2016-06-05 22:57:42 +01:00
Jonathan Li b20433c0be windows: Remove user.props references from all projects
find . -name *.vcxproj -exec sed -i -e '/user.props/d' {} \;

Microsoft recommends against using .user files. From
https://msdn.microsoft.com/en-us/library/669zx6zc.aspx :
"The best practice is to delete the reference to them in Property
Manager to ensure that your projects operate independently of any
per-user, per-computer settings. This is important to ensure correct
behaviour in a SCC (source code control) environment."

If you cannot compile SPU2-X after this commit (since that still relies
on the old DirectX SDK), you'll need to fix your build environment.
2016-05-29 12:21:52 +01:00
Jonathan Li 36cd1ae3cc windows: Remove parameter from prebuild command
It's unused. Also convert to using SolutionDir instead of Svnwhatever.
2016-05-28 23:25:08 +01:00
Jonathan Li 5f6658ae9a common:freebsd: Kill some warnings 2016-05-20 22:32:41 +01:00
Jonathan Li 7aa6564dcc common:freebsd: Fix compilation 2016-05-20 22:32:41 +01:00
Jonathan Li 280ca1dd85 utilities: Add FreeBSD thread name implementation 2016-05-20 22:32:41 +01:00
Jonathan Li f78d1a4018 utilities: Remove wx2.8 code and uses of wxMAJOR_VERSION 2016-04-29 00:09:47 +01:00
adamantike a0eca54f96 Trivial fix on wxFont style/weight usage 2016-04-24 13:25:56 -03:00
Jonathan Li 5035c8bd48 utilities: always include wx/crt.h on Linux
The header is necessary if the wx3.0 package isn't compiled with
wx2.8 backwards compatibility.
2016-04-23 13:57:47 +01:00
Jonathan Li dda44519c1 pcsx2|utilities: Use non-deprecated wxFont stuff 2016-04-23 13:57:42 +01:00
Gregory Hainaut c44f605b5e x86emitter: gcc 6 compilation fix
Fix #1297
2016-04-18 19:27:06 +02:00
Jonathan Li 0ab7b6340d Merge pull request #1275 from AdmiralCurtiss/memcard-plugin-switch-filter-reset
Move folder memcard filter management into the actual folder memcard class to fix #1179 and similar.
2016-04-06 23:59:36 +01:00
Gregory Hainaut 8ee9295f39 x86emitter: increase size of union capabilities 2016-04-04 21:04:41 +02:00
Gregory Hainaut ee08a6fc53 Merge pull request #1270 from PCSX2/monolithic-build
Monolithic build
2016-04-03 11:20:07 +02:00
Admiral H. Curtiss 97a68becb9 Handle filter management in the folder memcard class rather than outside.
This prevents desync between what is assumed to be the active filter and
what is actually the active filter, fixing errors like #1179 where the
memory cards are closed and reopened for whatever reason.
2016-04-02 15:22:11 +02:00
Gregory Hainaut 791a0ce702 common: initialize scalar field of pxThread
CID 147022

v2: initialize all member in initializer list
2016-03-30 19:55:45 +02:00