Commit Graph

7106 Commits

Author SHA1 Message Date
refractionpcsx2 4b63847e04 microVU: Fix logically dead code + bug
-Coverity CID 146821: In _mVUflagPass(microVU &, unsigned int, unsigned int, unsigned int, std::​vector<unsigned int, std::​allocator<unsigned int>> &): Code can never be reached because of a logical contradiction (CWE-561)

-Coverity CID 146822: In mVUcompileSingleInstruction(microVU &, unsigned int, unsigned int, microFlagCycles &): Code can never be reached because of a logical contradiction (CWE-561)
2015-09-26 13:34:20 +01:00
refractionpcsx2 a89307c5ba Vif: Fix logically dead code with something slightly quicker. Coverity CID 146827: In _vifCode_MPG(int, unsigned int, unsigned int const*, int): Code can never be reached because of a logical contradiction (CWE-561) 2015-09-26 13:00:28 +01:00
Gregory Hainaut 00e37224ed gsdx: check the return value of mkdir function
Reported by coverity
2015-09-26 13:51:23 +02:00
refractionpcsx2 457362ba84 VU Interpreter: Fix uninitialized scalar variable Coverity CID #146964. 2015-09-26 12:35:03 +01:00
micove 166818670e Merge pull request #833 from micove/Build_Bot
Simplify BuildBot and add a helper script for compilation.
2015-09-26 06:58:17 -04:00
Miguel A. Colón Vélez f201aac946 Simplify BuildBot and add a helper script for compilation. 2015-09-26 06:27:34 -04:00
refractionpcsx2 931fdf0bcd Merge pull request #839 from ssakash/patch-1
MicroVU: Fix a logically dead code for XGKick Instruction
2015-09-25 21:50:10 +01:00
Gregory Hainaut 070afe57af svu: fix buffer overrun on ialu&fmac
CID 146904 (#1 of 1): Out-of-bounds write (OVERRUN)
10. overrun-local: Overrunning array VU->ialu of 8 16-byte elements at element index 8 (byte offset 128) using index i (which evaluates to 8).

CID 146903 (#1 of 1): Out-of-bounds write (OVERRUN)
10. overrun-local: Overrunning array VU->fmac of 8 32-byte elements at element index 8 (byte offset 256) using index i (which evaluates to 8).
2015-09-25 21:04:58 +02:00
Gregory Hainaut 037bd3109e pcsx2: extend the size of plugin m_info array to avoid out-of-bounds
Note: previous fix +1 wasn't enough.
2015-09-25 21:00:16 +02:00
Gregory Hainaut 78b73ba585 gsdx: avoid null pointer deferencement 2015-09-25 20:59:36 +02:00
Gregory Hainaut 421043ed12 Merge branch 'coverity-qa-extra' 2015-09-25 18:42:20 +02:00
Gregory Hainaut 927dd827ce common: make DESTRUCTOR_CATCHALL macro really exception safe
Console.Error() can trigger some exceptions (like out of memory)

v2:
Add a default fallback catch(...) in case someone badly add a new
exception in the codebase
2015-09-25 18:41:19 +02:00
Gregory Hainaut bb6b792d06 Merge pull request #843 from pgert/master
sv_SE - update & improvements of Swedish translation.
2015-09-25 18:27:04 +02:00
Akash ffebefb65e MicroVU: Rework a logically dead code for XGkick.
mVU_XGKICK_CYCLES can only take delay cycle values 1 and 6, it can't take NULL value. the conditional check and parameter is useless here.
2015-09-24 03:05:40 +05:30
Gregory Hainaut 2eb73644e9 pcsx2|common: use DESTRUCTOR_CATCHALL to catch exception in various destructor
Allow to print a nice error message instead of a brutal abort in case of
massive failure
2015-09-23 09:47:27 +02:00
Gregory Hainaut 0bb62bb0fd pcsx2:init IsInterpreter member in constructor 2015-09-23 09:47:27 +02:00
Gregory Hainaut 4d8a23c1fc pcsx2:gui: init all members in constructor 2015-09-23 09:47:27 +02:00
Gregory Hainaut e41f786c72 pcsx2:gui: drop useless m_FrameCounter 2015-09-23 09:47:27 +02:00
Gregory Hainaut 5b4ba02012 pcsx2: init members in constructor 2015-09-23 09:47:27 +02:00
Gregory Hainaut 1c14389c7f pcsx2:DebugTools: init members in constructor 2015-09-23 09:47:27 +02:00
Gregory Hainaut 78ed0495ce pcsx2:CDVD: init members in constructor 2015-09-23 09:47:27 +02:00
Gregory Hainaut 8083b2c754 common: init values in the constructors of SpatialArrayReserve and pxStaticText 2015-09-23 09:47:27 +02:00
Gregory Hainaut 2c914b9b8f common:FastFormatString: remove unimplemented m_Length 2015-09-23 09:47:27 +02:00
Gregory Hainaut a6c29a5061 common: always set a default color in trace log 2015-09-23 09:47:27 +02:00
Gregory Hainaut 3064d0c300 common: init m_handled in the SrcType_PageFault constructor
Coverity:
CID 147021 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)i
2. uninit_member: Non-static class member m_handled is not initialized in this constructor nor in any functions that it calls.
2015-09-23 09:47:27 +02:00
Gregory Hainaut 23591deb81 pcsx2: initialize members in constructor of objects 2015-09-23 09:47:27 +02:00
Gregory Hainaut 5fb8c7e65c gsdx: initialize members in constructor of objects
A couple of useless members were removed too.

Also fix wnd initialization

Coverity:
CID 146955 (#1 of 1): Uninitialized pointer read (UNINIT)
18. uninit_use: Using uninitialized value wnd[i].
2015-09-23 09:46:53 +02:00
Gregory Hainaut c4a3d57499 gsdx: protect fscanf string read
Coverity:
CID 146816 (#1 of 1): Calling risky function (DC.STREAM_BUFFER)
dont_call: fscanf(FILE *, char const *, ...) assumes an arbitrarily large string, so callers must use correct precision specifiers or never use fscanf(FILE *, char const *, ...)
2015-09-23 09:39:09 +02:00
Gregory Hainaut 7bec15b99f gsdx: remove useless condition check
Base pointer and format are always positive (unsigned int BTW) so drop
>= 0 comparison
2015-09-23 09:39:08 +02:00
Gregory Hainaut 4184d6eef5 pcsx2:cso: NULL pointer check
Coverity:

CID 146846 (#1 of 1): Dereference after null check (FORWARD_NULL)
5. var_deref_model: Passing null pointer fp to fclose, which dereferences it
2015-09-23 09:39:08 +02:00
Gregory Hainaut b9e00ab611 i10n: update es_ES mo file. 2015-09-23 09:26:24 +02:00
pgert d256ecb6db sv_SE - update & improvements of Swedish translation. 2015-09-22 15:44:40 +02:00
Avi Halachmi (:avih) cee0b795ee Recording: handle cancel (at the GS[dx] dialog) gracefully
Without this patch, if a user initiates a recording and then cancels at the GSdx
dialog, the audio was recording anyway, which is probably highly unexpected.

However, while probably highly unexpected, it could still be useful to record
only audio, but with this patch it's now impossible.

We can reconsider if it turns out that people are actually using this "feature",
though one might as well set the video setting to be very unobtrusive (very low
resolution/bitrate) such that it uses very little CPU.
2015-09-22 01:11:25 +03:00
Avi Halachmi (:avih) 4474d4391b GSdx: capture - print recomended resolution and DAR to the console
This is the internal resolution which GSdx uses and recording at this resolution
is optimal, i.e. without any dumb scaling, with all relevant pixels and without
redundant pixels.

The resulting clip still doesn't have the correct aspect ratio set, but that's
just a property which can be set to the clip afterwards, which is where the DAR
becomes useful. Since it's usually anamorphic, when muxing later with the audio
use the DAR to set the playback aspect ratio.
2015-09-22 01:11:13 +03:00
Avi Halachmi (:avih) 3f81fc98dd gsdx: custom resolution - use 0 instead of 9 2015-09-22 01:00:53 +03:00
Jonathan Li 4208267966 gsdx|spu2-x:windows: Scale GUI logo with DPI
The SS_REALSIZECONTROL style resizes image to fit the control window, so
let's use that.
2015-09-21 20:45:50 +01:00
Jonathan Li c088039394 gsdx:linux: Fix clang compile
Everything seems to compile and run with clang 3.7.0 now. I don't know
if clang 3.6.x works or not. 3.5.x doesn't.
2015-09-21 20:45:50 +01:00
Jonathan Li 2c2c61920e cmake: Don't add -std=c++11 to CMAKE_C_FLAGS
Fixes a cmake detection problem when compiling with clang (3.7.0 in my
case). clang outputs the error "Invalid argument '-std=c++11' not allowed
with 'C/ObjC'", which causes lzma, Xext and other things to be
considered "not found".
2015-09-21 20:45:50 +01:00
Jonathan Li b0803a4bc6 pcsx2:debugger: Fix potential buffer overrun
CID 146914 (#1 of 1): Copy into fixed size buffer (STRING_OVERFLOW)

The overflow can be triggered using the Debugger's Rename Function
feature.
2015-09-21 20:44:46 +01:00
Jonathan Li 39c5cd4f84 pcsx2:cdvd: Fix memleak
CID 146832 (#4-1 of 6): Non-array delete for scalars (DELETE_ARRAY)

ScopedPtr is for non-array objects only. Use ScopedArray instead.
2015-09-21 20:13:55 +01:00
Jonathan Li 69d27dfb4b Merge pull request #829 from ssakash/rework_internalres
gsdx changes:
Remove native resolution checkbox from GUI and rework associated code
Small changes to Windows and Linux GUI
Support 8x native resolution
Fix custom resolution width less than native width use case
2015-09-21 20:12:47 +01:00
Gregory Hainaut 130a84d2af pcsx2:debugger: miss a coma
Thanks RebelliousX
2015-09-21 09:32:13 +02:00
Gregory Hainaut d42cef891c gsdx: remove ALIGN_STACK feature on GCC
Stack is already aligned correctly. Besides GCC optimizes the variable so it doesn't
have any effect except that it generates useless warnings.
2015-09-20 22:19:45 +02:00
Gregory Hainaut 9b69afe541 gsdx-ogl: typo that broke TC offset hack 2015-09-20 22:19:45 +02:00
Gregory Hainaut b60dd9d1fe Merge pull request #814 from PCSX2/coverity-qa-high
Fix a bunches of coverity warning/errors.
2015-09-20 22:18:03 +02:00
Avi Halachmi (:avih) 94c5eab776 GSdx: capture dialog - actually remember the last used codec
Previously it was saving the display name to the config but trying to restore
according to the friendly name.

Now store and restore according to the "displayName" which is more unique than
"friendlyName" since it includes GUID[s], and handle it consistently as _bstr_t.
2015-09-20 20:04:36 +03:00
Jonathan Li d4f6894e1b gsdx: Fix custom resolution and minor cleanup
This fixes the following issues when custom resolution is selected.
 - When the width is smaller than the native resolution width, the
   texture cache targets are removed on every Vsync signal, causing a
   black screen issue.
 - The texture cache code needs a 1 returned for the custom resolution
   upscale multiplier or there'll be some really funny graphical issues.

It also removes unnecessary GetConfig (which I think unconditionally
does a a file read on Windows) calls if the width was increased - the
upscale multiplier is already stored, and the custom resolution width
and height calls are now unnecessary.

Also fix some whitespace issues.
2015-09-20 07:49:46 +05:30
Gregory Hainaut 28191baa80 gsdx-linux: merge native/upscaling/custom into a single box 2015-09-20 07:49:44 +05:30
Akash a9b0cfc519 GSDX: Add 8X native to Internal resolution. 2015-09-20 07:49:32 +05:30
Admiral H. Curtiss 051a7f3451 FolderMemoryCard: Handle empty files on load and write 2015-09-20 01:13:54 +03:00