Commit Graph

7017 Commits

Author SHA1 Message Date
Gregory Hainaut 0422854384 pcsx2:interpreter: always false condition
Both fields are 10 bits but the ~ operation apply on the 32 bits.
Therefore msb bits were always '1' and the condition always false.

Code is only used on the interpreter but it could explain some hangs
2015-09-11 20:01:01 +02:00
Gregory Hainaut bfe1236d98 pcsx2|lilypad: Unintentional integer overflow
Add some cast to do the intermediate operation in 64 bits
2015-09-11 16:50:02 +02:00
Gregory Hainaut 6c7ce3465e pcsx2:CDVD: guarantee that index of mg_zones array is below than 8
CID 146917 (#1 of 1): Untrusted array index read (TAINTED_SCALAR)
tainted_data: Using tainted variable cdvd.Result[1] as an index into an array mg_zones
2015-09-11 09:25:09 +02:00
Gregory Hainaut 8928c3e7f1 onepad: be sure pad variable is 0 or 1
CID 146918 (#1 of 1): Use of untrusted scalar value (TAINTED_SCALAR)
tainted_data: Passing tainted variable pad to a tainted sink
2015-09-11 09:18:49 +02:00
Gregory Hainaut 113c0aa411 pcsx2: use sizeof of object instead of pointer (portability)
CID 146912 (#1 of 1): Sizeof not portable (SIZEOF_MISMATCH)
suspicious_sizeof: Passing argument recConstBuf of type u32 * and argument 131072U /* RECCONSTBUF_SIZE * sizeof (recConstBuf) */ to function memset is suspicious. In this case, sizeof (u32 *) is equal to sizeof (u32), but this is not a portable assumption.
2015-09-11 08:54:29 +02:00
Gregory Hainaut 2430abed33 gsdx: potential division by zero
CID 146833 (#2-1 of 2): Division or modulo by zero (DIVIDE_BY_ZERO)
divide_by_zero: In expression this->m_width / this->m_upscale_multiplier, division by expression this->m_upscale_multiplier which may be zero has undefined behavior.
2015-09-11 08:54:29 +02:00
Gregory Hainaut e6d1a4cccf gsdx: avoid a potential division by zero
CID 146835 (#1 of 1): Division or modulo by float zero (DIVIDE_BY_ZERO)
50. divide_by_zero: In expression (float)(end - start) / (float)frame_number, division by expression frame_number which may be zero has undefined behavior
2015-09-11 08:54:29 +02:00
Gregory Hainaut 2934a15902 gsdx: remove a duplicated check 2015-09-11 08:54:29 +02:00
Gregory Hainaut f092f9045c pcsx2: initialize the block pointer
There is a check on it on the resize function
2015-09-11 08:54:29 +02:00
Gregory Hainaut ac8f4e69d6 pcsx2|gsdx: avoid potential null deferencement 2015-09-11 08:54:29 +02:00
Gregory Hainaut 0260c9119e common: suspicious missing comma 2015-09-11 08:54:29 +02:00
Gregory Hainaut 1baa6be6de debugger: enforce a null terminated char of a C-string
CID 146728 (#1 of 1): Buffer not null terminated (BUFFER_SIZE_WARNING)
buffer_size_warning: Calling strncpy with a maximum size argument of 128 bytes on destination array mod.name of size 128 bytes might leave the destination string unterminated
2015-09-11 08:52:05 +02:00
Gregory Hainaut b082147c4d onepad: avoid potential resource leak 2015-09-10 14:21:27 +02:00
Gregory Hainaut f4f08b9c99 pcsx2: avoid couple of out-of-bounds access 2015-09-10 14:20:51 +02:00
Gregory Hainaut c687c73edd pcsx2:debugger: avoid strlen call on random data 2015-09-10 13:46:36 +02:00
Gregory Hainaut 0bcaff4214 pcsx2:cdvd/debug: various uninitialized data
Most of the time, code is correct. In doubt always init the value.
2015-09-10 13:45:42 +02:00
Gregory Hainaut 5e8f899620 pcsx2:debug: miss a break that lead to a mem leak 2015-09-10 13:42:23 +02:00
Gregory Hainaut 5c933a7faf pcsx2:gzip: free the index
Normally index will be NULL if len is 0 but it won't hurt
2015-09-10 13:41:22 +02:00
Gregory Hainaut 8b2de15096 build: add an option to build a coverity DB 2015-09-10 13:40:45 +02:00
Gregory Hainaut ddc03cbccf gsdx: add a nice enum to replace the hardcoded convert shader 2015-09-08 16:51:24 +02:00
Gregory Hainaut 1ae0fed83b gsdx: fix a regression due to the shader renaming 2015-09-08 16:06:15 +02:00
Gregory Hainaut 81e056e79a gsdx: always enable the boost queue
ifdef was for VS2010

GSThread.h is useless. I keep it for the transactional queue implementation
2015-09-08 14:43:09 +02:00
Gregory Hainaut 3706cfe908 gsdx: always enable CXX11 mutex feature.
ifdef was only useful for VS2010
2015-09-08 14:34:17 +02:00
Gregory Hainaut ca9b5ce11d gsdx-ogl: move depth conversion shader
Add 2 new shaders:
* ps_main12: cast a 16 bit depth to a RGB5A1 color
* ps_main16: cast a a RGB5A1 color to a 16 bit depth

Shader might be used in future commit as it seems Silent Hill uses this
kind of format.

Fix tab/indentation too
2015-09-08 12:41:05 +02:00
Gregory Hainaut 4eed4ca3a1 gsdx-debug: restore 16 bit dump format in the SW renderer
Actually dump both 32/16 bits (former for texture shuffle and later
for real 16 bits RT)
2015-09-08 12:41:05 +02:00
Jonathan Li 9d4a8688c1 Merge pull request #801 from turtleli/windows-left-list-icons
Have listbook icons (Emulation Settings, Plugin BIOS selector) on the left for all platforms.
Don't set minimum widths for Framelimiter and Frameskip panels.
2015-09-07 08:46:49 +01:00
Jonathan Li 1d2d8cd38b gui: Don't set min widths for Framelimiter/skip panels
It causes weird behaviour at higher DPIs.
2015-09-07 08:26:20 +01:00
Jonathan Li 5e9ba64db8 gui: Have listbook icons on left for all platforms
On Windows, this fixes the minimise/restore weird dialog bug on the
Emulation Settings and Plugin/BIOS selector dialogs. It also fixes a bug
at high DPI, where it becomes difficult to click on GUI elements at the
top of the dialog.

It also makes it easier for me to work on the Windows DPI stuff, I don't
have a 4k monitor.
2015-09-07 08:25:56 +01:00
Jonathan Li ca0aeb8e62 Windows: Avoid lockup for RuntimeError exception
This is the same problem that the Plugin Open and BIOS load exceptions
had - The message box pops up, intercepts the hide event for GSFrame and
leaves you with no alternative but to terminate PCSX2 via the Task
Manager.

The same solution applies - Close the GSFrame first.
2015-09-06 20:36:19 +01:00
Jonathan Li d87b34ab36 gui: Increase presets message width
This prevents clipping at 200% DPI on Windows.
2015-09-05 23:10:15 +01:00
Jonathan Li e2f1bafeef gui:windows: Fix tooltip wrapping
wxWidgets 3.0 now wraps tooltips automatically on Windows, so the custom
tooltip wrapping functionality is no longer necessary.
2015-09-04 22:54:11 +01:00
Jonathan Li 31a505768d gui: Use SetSizerAndFit after dialogs are constructed.
It seems to fix the button UI problem for Linux wx3.0 builds.
2015-09-04 17:58:25 +01:00
Jonathan Li 9052930ebc Merge pull request #791 from turtleli/gsdx-gui-changes
Add tooltips to Windows GUI. Fixes #578.
Rearrange Window GSdx GUI a bit.
Reformat tooltip descriptions to be both Linux and Windows (un)friendly.
Add new tooltip descriptions.
2015-09-03 22:49:41 +01:00
Jonathan Li 2b6d44a043 gui: Fix Emulation Settings dialog, GS section
Expand "Disable Framelimiting" and "Synchronised MTGS". Fixes message
truncation on Linux, and Windows at higher DPI.

Don't use pxFitDigits on Spin Controls - the sizing algorithm fails
horribly on GTK3, which means you can't see anything.

And don't use a row of spacers - it causes a minor display issue with
GTK3.
2015-09-03 17:22:12 +01:00
Jonathan Li 288931ddc3 Merge pull request #781 from ssakash/patch-49
Fix Windows Lilypad local volume control GUI checkbox.
Make MicroVU E-bit delay slot warning a Dev warning.
Don't minimise GS Window if main window is minimised.
2015-09-02 21:51:04 +01:00
Akash b5aceceef2 don't minimize GS window along with main window.
previously the GS window (rendering window) also gets minimized with the Main window (GUI) whenever it gets minimized. many users didn't like this behavior, hence make it so that GS window doesn't get minimized along with the main one.

The parent window pointer parameter is no longer needed, since the parent parameter at WX Frame has been replaced with Null which doesn't force minimize it due to no parent relationship.
2015-09-02 08:27:18 +05:30
Akash 8ebe03a89d MicroVU: use DevCon.Warning for E-bit delay slot.
The following E-bit delay slot warning initially used a console error message which has a sort of bright red which would cause users to provide a lot of attention towards to it, whereas it isn't much to be bothered since it doesn't cause any issues on the game according to refraction it was already dealt with on the code.

So, use a proper warning indicator instead of a error log message.
2015-09-02 08:27:15 +05:30
Jonathan Li e5f045c375 gsdx: Add new tooltips and descriptions.
For Linux and Windows, add tooltip descriptions for AF, AA1, extra
rendering threads, Enable Shade Boost, FX Shader/External Shader, FXAA.

For Windows, also add Alpha Correction and Logarithmic Z tooltips.

For Linux, add software mipmap tooltip.

Thanks to tsunami2311, ssakash, gregory38 and whoever did the wiki for
helping with descriptions.
2015-09-01 19:25:28 +01:00
Jonathan Li 55adc7e728 gsdx: tooltip description formatting and minor fixes
The hack description box messages were replaced by tooltips on Windows,
so there is no need for the first line in the description to refer to
the hack anymore.

3-state checkboxes were also converted to comboboxes, so remove any
references to checkbox states.

Reformat the descriptions so it looks okay on both Windows and Linux.
Could be better, but I'm out of ideas.

Also fix a few typos and missing punctuation.
2015-09-01 19:25:27 +01:00
Jonathan Li b687b106f1 gsdx: Removed unnecessary defines and functions
The changes to the Hacks dialog removes the need for these defines.

Also remove the swap_state function since it's now unused.
2015-09-01 19:25:26 +01:00
Jonathan Li c72b4d6e8a gsdx:windows: Rework hacks dialog to use tooltips
Changes the three-state checkboxes to comboboxes.
Removes the hack description box.
Hides Alpha and Alpha Stencil when OpenGL is selected.
Rearranges the hacks dialog.
2015-09-01 19:25:26 +01:00
Jonathan Li fcc8a941b0 gsdx:windows: Redo main dialog
This moves the hardware, non-renderer dependent options to the top and
makes the renderer options visible only when it affects the current
renderer.

The texture filtering checkbox has been changed to a combobox and now
uses the same description as Linux does.

Also changes the Title to GSdx Settings.
2015-09-01 19:25:25 +01:00
Jonathan Li e6b9805167 gsdx:windows: Show tooltips on main dialog 2015-09-01 19:25:25 +01:00
Jonathan Li 48bba4d581 gsdx:windows: Add tooltip support
Tooltips will be usable for all Gsdx dialogs if required.
2015-09-01 19:25:24 +01:00
Jonathan Li 9929962d54 gui:windows: Scale settings dialog widths with DPI
Height is calculated automatically, so that's sort of ok. A lot more
fixes will be needed to fix the rest of the DPI stuff.
2015-09-01 18:25:19 +01:00
Jonathan Li 149b7fc347 gui: Fix Windows screenshot workaround comment.
It's an actual wx3.0 bug, not a bug in dialog construction.
2015-09-01 18:14:03 +01:00
Jonathan Li cc1d50a06c gui:windows: Show tooltips for as long as possible.
It'll show for 32.767s. Windows unfortunately doesn't have an infinite
value, and also uses a signed 16-bit integer for the delay.
2015-09-01 18:14:03 +01:00
Miguel A. Colón Vélez 4a743ac2fb Remove Dependency and UAC info from the manifest file.
Visual Studio adds the dependency info automatically and /MANIFESTUAC
adds the UAC part.
2015-08-31 21:03:53 -04:00
micove 287672d3c1 Merge pull request #795 from micove/Recognize_Win8-10
Recognize Win 8, 8.1 and 10.
2015-08-27 08:36:10 -04:00
Miguel A. Colón Vélez f29dd8b927 Fix Windows XP Home vs Pro detection.
VER_SUITE_PERSONAL is set for XP Home therefore the check was backwards.
2015-08-26 16:02:26 -04:00