Commit Graph

7363 Commits

Author SHA1 Message Date
Gregory Hainaut 2b06d34279 pcsx2: use Reassign of the scoped pointer to improve readability
Note: it is equivalent to a basic assignment due to operator overloading
2015-10-21 20:10:16 +02:00
Gregory Hainaut 826319ce34 gsdx-ogl: check null pointer
CID 151735 (#1 of 1): Dereference after null check (FORWARD_NULL)
61. var_deref_model: Passing null pointer rt to CopyRectConv, which dereferences it
2015-10-21 20:10:16 +02:00
Gregory Hainaut d7afd7aae0 pcsx2:debug: swap 2 arguments
It changes nothing but it is more consistent

CID 146916 (#1 of 1): Arguments in wrong order i
(SWAPPED_ARGUMENTS)swapped_arguments: The positions of arguments in the call to disBranch do not match the ordering of the parameters:

    rt is passed to rs
    rs is passed to rt
2015-10-21 20:10:16 +02:00
Jonathan Li aff1467ea3 debugger:linux: Fix wx2.8 compilation
Bind doesn't work on wx2.8. Replace with event tables and Connect.
wxString::Format also requires the format string to be L"something".
const char* requires an explicit conversion to wxString.
The show 128/64/32 bit menu column stuff doesn't have a direct wx2.8
replacement so just omit it - I'm not sure it's useful functionality
anyway.
2015-10-21 17:34:02 +01:00
Jonathan Li ccb261a8a3 debugger: Set wxGrid label font as well
It makes the debugger window more vertically compact.
2015-10-21 17:34:02 +01:00
Jonathan Li 9d23fc222a Merge pull request #885 from byehi5299/ctrlregisterlist
Rewrite CtrlRegisterList to allow scrolling and fix size issues.
It now works better on small screens and has simpler code.
2015-10-21 17:33:10 +01:00
Gregory Hainaut e5015faafa Merge pull request #906 from PCSX2/try-catch-register-allocation-error
pcsx2: generate an exception when recompilation failed
2015-10-21 15:16:45 +02:00
Gregory Hainaut a4c37d7f51 pcsx2: fallback to the interpreter if bad register allocation 2015-10-21 13:16:51 +02:00
Miguel A. Colón Vélez 8cf51c5cf4 Linux GUI: Fix invalid cast from 'wxPizza' to 'GtkBin'.
(PCSX2:32189): GLib-GObject-WARNING **: invalid cast from 'wxPizza' to 'GtkBin'
.
Cast the wxPizza directly to a GtkWidget. Looking at the wx3.0 source code the pizza
constructor returns a GtkWidget. Also GetHandle() returns a GtkWidget:
http://docs.wxwidgets.org/trunk/classwx_window.html#a185e6cd7065367b552748cb722651b27
2015-10-20 18:23:48 -04:00
refractionpcsx2 2a21224ab8 Merge pull request #907 from ssakash/gameDB_update
GameDB: Update compatibility status of games.
2015-10-20 22:43:30 +01:00
Akash 78890f925c GameDB: Update compatibility status of games. 2015-10-21 03:08:43 +05:30
Gregory Hainaut 796f831296 pcsx2: generate an exception when recompilation failed
Avoid the cost of checking -1 for a very rare case.

It misses currently a good fallback
2015-10-20 18:23:38 +02:00
Gregory Hainaut 5f78644bb6 Merge pull request #902 from PCSX2/convert-auto_ptr-unique_ptr
pcsx2: auto_ptr is deprecated in favor of auto_ptr
2015-10-19 15:37:35 +02:00
Gregory Hainaut c42f46eba4 pcsx2: auto_ptr is deprecated in favor of unique_ptr 2015-10-19 13:41:34 +02:00
byehi5299 369a6a30da A few small formatting changes. 2015-10-18 22:01:30 -04:00
Gregory Hainaut 395b4c25f3 Merge pull request #899 from ssakash/gsdx_nullcheck
gsdx: use old size of target if ds and rt is null
2015-10-18 19:25:39 +02:00
Jonathan Li 26de185f54 pcsx2: Fix OpenSUSE 13.2 wx3.0 compile
I have no idea why it fails to convert the wxString to a const wxChar *.
2015-10-18 15:13:59 +01:00
Jonathan Li 7fac189ab3 spu2-x:linux: Fix potential null deference
Coverity CID 146911: Dereference before null check (REVERSE_INULL)
2015-10-18 14:01:27 +01:00
Gregory Hainaut d5e0899955 oups collision with ref commit 2015-10-18 11:19:39 +02:00
Gregory Hainaut f99882c61c gsdx-ogl: keep gl_ActiveTexture & gl_BlendColor (fix MS compilation)
It seems openGL ABI isn't exactly the same between Windows and my PC.
2015-10-18 11:18:19 +02:00
refractionpcsx2 42a4c7d368 GameDB: Add comment for hack required for Dakar 2 on OPM Demo Disc 33 2015-10-18 02:38:58 +01:00
refractionpcsx2 179a4cead5 GSdx: Fix compilation 2015-10-18 02:01:56 +01:00
refractionpcsx2 b132557f04 GameDB: Fixed entry for PBPX-9505, serial incorrect, updated name 2015-10-18 01:26:13 +01:00
Akash 294b8d3c6e gsdx: use old size of target if ds and rt is null
CID 146843 (#1 of 1): Dereference after null check (FORWARD_NULL)6. var_deref_model: Passing null pointer ds to GetSize, which dereferences it.
2015-10-17 22:47:44 +05:30
Gregory Hainaut 0958b9db8e gsdx-ogl: use the standard openGL name
Function pointer was mangled to avoid any collision. Nowadays all symbols
are hidden so no risk of collision.

Syntax is nicer beside it would allow to put back GLES3.2. I think it
supports most of the used extension.

glActiveTexture & glBlendColor are provided without symbol query.
2015-10-17 17:05:15 +02:00
Gregory Hainaut 1c8f8a00b8 Merge pull request #894 from ssakash/coverity_fix
Coverity: Prevent NULL dereferences and other stuffs.
2015-10-17 16:00:28 +02:00
Gregory Hainaut eb387e16f4 onepad: fix compilation on SDL1 2015-10-17 14:38:46 +02:00
refractionpcsx2 706bbcf8a9 IOP Counters: Silly error fixed.
-Coverity CID 152835 & 152834: The expression's value does not depend on the operands; often, this represents an inadvertent logic error.
In psxRcntWcount32(int, unsigned int): An operation with non-constant operands that computes a result with constant value (CWE-569)
2015-10-17 12:52:49 +01:00
Gregory Hainaut 4f86cca306 common: don't return a boolean for an assert
It might help to fix those 2 coverity reports.

CID 151744 (#1 of 1): Useless call (USELESS_CALL)
side_effect_free: Calling EnumAssert(id) is only useful for its return value, which is ignored

CID 151745 (#1 of 1): Useless call (USELESS_CALL)
side_effect_free: Calling EnumAssert(id) is only useful for its return value, which is ignored.
2015-10-17 11:49:04 +02:00
Gregory Hainaut 9b796d0f27 Merge pull request #892 from 3kinox/rumble_onepad
Implement rumble and isolate SDL code path
2015-10-17 11:00:06 +02:00
Akash fedd07e4a8 gsdx: prevent a potential division by zero
CID 146834 (#2-1 of 2): Division or modulo by zero (DIVIDE_BY_ZERO)9. divide_by_zero: In expression tpf * 10000ULL / ttpf, division by expression ttpf which may be zero has undefined behavior.
2015-10-17 11:26:11 +05:30
Akash b8caab5f3d pcsx2: prevent a potential null deference
CID 146889 (#1 of 1): Dereference null return value (NULL_RETURNS)4. dereference: Dereferencing a pointer that might be null wxGetApp()->GetDisassemblyPtr() when calling update

FindWindowById returns NULL if the Window with the given id is not found, no need to do a extra check for validation of the id. also do a check for wxGetApp()->GetDisassemblyPtr() to prevent a null deference.
2015-10-17 11:26:08 +05:30
Akash 04b765a674 gsdx: check for null deference.
CID 146839 (#1 of 1): Explicit null dereferenced (FORWARD_NULL)11. var_deref_model: Passing null pointer fb_pages to UsePages, which dereferences it.

CID 146840 (#1 of 1): Explicit null dereferenced (FORWARD_NULL)11. var_deref_model: Passing null pointer zb_pages to UsePages, which dereferences it.

* Prevent a potential null pointer deference in ```void GSRendererSW::UsePages()```
2015-10-17 09:14:07 +05:30
3kinox d7155f839f onepad:
+ Implement and activate rumble.
2015-10-16 23:55:18 +02:00
3kinox fb0d7139f2 onepad:
+ Isolate every SDL code paths and replace any call to them by call to a generic class "GamePad" of which JoystickInfo is now a child.
+ Now backends can be added by inheriting GamePad generic class.
+ There is just one function change which is redundant with next commits but otherwise commit will not compile(which is more evil).
2015-10-16 23:53:51 +02:00
3kinox 9ab554af5b onepad:
+ Objectify conf class.
+ Make some members private as they need to have their range checked before being set
+ Change "options" variables into an union contraining bitfield representation of it. Allows to make code more expressive/readable.
2015-10-16 23:47:55 +02:00
Gregory Hainaut 096e5e1fef spu2x: correctly apply the volume to the external source
CID 147046 (#1 of 1): Useless call (USELESS_CALL)
side_effect_free: Calling ApplyVolume(Ext, Cores[1].ExtVol) is only useful for its return value, which is ignored.
2015-10-16 23:17:07 +02:00
Gregory Hainaut 03bc304ecf gsdx-ogl: fix colclip regression when accurate blending is enabled
Fix #865
2015-10-16 22:07:50 +02:00
refractionpcsx2 9a2212c86e IOP Counter/IRQ: Misc Counter and IRQ handling changes based on NoCash documents for PS1. 2015-10-16 00:48:26 +01:00
refractionpcsx2 d01f8f9252 VSync/EE Counters: Fixes for Fatal Fury BA 1 & Legendz Gekitou! Saga Battle
-Fix up Vsync again, broken back in google code days, broke Fatal Fury, matches PS2 test again.
-Corrected the Vsync Gate 0, which was the wrong way around, Causing Legendz Gekitou not to work unless Vsync was wrong
2015-10-16 00:38:04 +01:00
byehi5299 f7e10ed53e Rewrite of CtrlRegisterList class to enable scrolling. 2015-10-14 18:11:22 -04:00
refractionpcsx2 bbd74e5a7e Merge pull request #891 from ssakash/MicroVU_branch_addr
MicroVU: Replace BranchAddr macro with an Inline function
2015-10-13 16:36:35 +01:00
Akash 71dbe3e4c4 MicroVU: Replace BranchAddr macro with an Inline function
Coverity seems to not like the assert trick and only considers the macro as a single statement, so let's rework branchAddr and branchAddrN to satisfy coverity and improve the code quality. The following patch fixes 8 coverity issues with the same problem , CID 151736 - 151743.

(#1 of 1): Misused comma operator (NO_EFFECT)extra_comma: Part !!((mVU.prog.IRinfo.curPC & 1U) == 0U) of statement (!!((mVU.prog.IRinfo.curPC & 1U) == 0U)) , ((mVU.prog.IRinfo.curPC + 2U + (s32)((mVU.code & 0x400U) ? 0xfffffc00U | (mVU.code & 0x3ffU) : (mVU.code & 0x3ffU)) * 2 & mVU.progMemMask) * 4U) has no effect due to the comma.
2015-10-13 20:25:02 +05:30
Gregory Hainaut 4d680b73dc pcsx2 debugger: don't use erased iterator
CID 146848 (#1 of 1): Using invalid iterator (INVALIDATE_ITERATOR)
8. use_iterator: Using invalid iterator existing.

Directly edit the value through the iterator.
2015-10-13 00:17:28 +02:00
Gregory Hainaut 7c69958c92 i10n: add zh_TW 2015-10-12 23:48:02 +02:00
Gregory Hainaut 3027b4b694 pcsx2: exit function if we can't allocate an xmm register
Allocation must always succeed
2015-10-12 23:45:43 +02:00
refractionpcsx2 4560620210 GS-Wnd: Fix UI to show UI percentage. Set defaults for the title bar. Add a sort of lie mode omodec, which says you are using progressive when Interlace(Field) is active as this most isn't technically interlaced but actually half FPS, see this comment https://github.com/PCSX2/pcsx2/issues/832#issuecomment-141248883 2015-10-12 21:21:46 +01:00
refractionpcsx2 b3d9feb1f2 Merge pull request #880 from PCSX2/coverity-negative-index-array
pcsx2: forbid negative index of array in case of register allocation failure
2015-10-12 20:52:28 +01:00
Gregory Hainaut 90df78c9e0 Merge pull request #874 from pcsx2fan/master
Update GUI Translation for Chinese Traditional aka zh_TW
2015-10-12 21:47:57 +02:00
Gregory Hainaut 63889d3bea pcsx2: replace error message with a dev assert
Code mustn't be reached. Otherwise registers aren't properly freed
2015-10-12 21:38:27 +02:00