Commit Graph

7290 Commits

Author SHA1 Message Date
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
avih 56452481e2 Merge pull request #834 from PCSX2/gsdx-prog-rec
GSdx: recording: Progressive: make the recorded clip play at full speed
2015-09-19 04:46:05 -07:00
Avi Halachmi (:avih) 54afd377ee GSdx: recording: Progressive: make the recorded clip play at full speed
Before this patch, when recording Progressive (frame) mode, it recorded all
the frames correctly but set the clip's fps property to 25/29.97, so when
played back it played at half the speed (but was fine when played at double speed).

This patch does not affect the number of frames recorded per second, but rather
only sets the resulting clip fps property to the correct one (double than before).

Also fixes a bug that in a non-managed window in progressive mode, the title
displayed "200%" speed when it should have displayed 100% speed.

Fixes #832
2015-09-19 14:44:48 +03:00
Avi Halachmi (:avih) ddb87027f9 folderMemoryCard: hack - don't call hundreds of times per second
In order to flush data with some delay after save-to-memory-card, the code was
calling sioNextFrame() on each frames (60 times/s) continuously as long as the
emulation is active, regardless if FMC is in use or if memory cards in general
are in use.

Further to that, each call to sioNextFrame calls 8 times into the memory card
plugin even if FMC is not in use, resulting in overall ~500 calls/sec with the
sole goal of facilitating delayed flush after MCD save with folder memory cards.

This patch is a hack to call it once per second instead of 60 per second, but we
need to remove this call completely.

The delayed flush will now happen after 60-120 frames instead of exactly 60.
2015-09-19 13:41:24 +03:00
Avi Halachmi (:avih) ef9016e363 folderMemoryCard: hack - don't hang PCSX2 if a file has zero size
I'm not sure if it breaks the state of the folderMemoryCard (FMC) or not, but
at least it doesn't hang PCSX2.

Might need followup to make sure the state ends up valid.
2015-09-19 13:36:49 +03:00
Jonathan Li e576f259e4 Merge pull request #807 from turtleli/windows-dpi-image-scaling
Scale images according to DPI (Windows)
Partially fix theming
2015-09-19 10:31:53 +01:00
Avi Halachmi (:avih) f5a38ab954 gameindex.dbf: update compatibility from the forum: 31 better, 1 worse 2015-09-18 15:06:25 +03:00
Avi Halachmi (:avih) dfe08e3c96 gameindex.dbf updater: slightly more verbose by default
Now also summarizes regions by default and also lists compatibility improvements
by default (both can be configured to be silent).
2015-09-18 15:02:23 +03:00
pgert 9eb5f36ecc Specifications & Corrections of PAL languages in GameIndex.
What this PR primarily does is to sort out the PAL-E mess.
Some have used PAL-E for Englsh, others for Europa (PAL-M5), and others still for España.
With this PR all PAL-E should refer to English, while the ones referring to Europa have PAL-M5 or something as a code, and the ones referring to España have PAL-S as a code.

Generally only one letter is used for the more common languages; English etc.
So is the case in this PR.

For some PAL-M2 entries in particular, though maybe also for some PAL-M3 entries, there can be 2 or more discs of the same game having this code; it's not necessarily a disc specific code - it only tells how many languages the disc supports.
So is the case in this PR.

Language codes used:
E - English
G - German
I - Italian
S - Spanish
F - French
P - Portuguese
R - Russian
DU - Dutch
NO - Norwegian
SE - Swedish
DA - Danish
FI - Finnish
CZ - Czech
PL - Polish
HR - Croatian
HI - Hindu
2015-09-18 13:46:44 +03:00
Avi Halachmi (:avih) ece9c7f2d2 GS window title: remove "align" space at fps value.
This value doesn't fluctuate frequently between 2/3 digits, so there's no need
for alignment, and it also saves some space most of the time.
2015-09-17 05:32:15 +03:00
Avi Halachmi (:avih) a6737b87fd Custom frame rate: improve message, respect also for NTSC-progressive
When a custom PAL/NTSC frame rate is used, PCSX2 respects it for PAL and NTSC,
but disrespected it for NTSC-progressive mode (used hardcoded 30/60). Fixed.

Also, when a custom rate was used, the console message displayed half the rate
which was configured. Now print the actual rate.
2015-09-17 01:40:05 +03:00
avih ca5e9d872f Merge pull request #827 from ssakash/patch-2
GS window title: Add speed in percentage and make it the main speed value
2015-09-16 15:38:25 -07:00
Akash 304fc990a1 PCSX2: Add Percentage Counter for FPS.
The FPS has been Indicated in Paranthesis whereas Speed would provide the Integer percentage value based on the FPS limit for NTSC, PAL games. (59.94, 50)

Thanks to avih for the suggestions.
2015-09-17 03:59:48 +05:30
Avi Halachmi (:avih) d10bbb73f7 FixedInt - round instead of truncate on construction
This could have caused issues where e.g. Fixed100(59.94) differed from
Fixed100::fromString("59.94") due to precision compilation flags
(the former could, and did on Devel builds, end up with Raw == 5993, which
differs from the value constructed from the string at the ini file,
and then it would be incorrectly identified as a custom rate).

Rounding seems the more likely intention when effectively decreasing the
precision of a value.

Unlikely that we have code which depends on truncating behavior, though not
impossible.
2015-09-17 00:30:08 +03:00
Gregory Hainaut 2d97f6dd53 Merge pull request #823 from IlDucci/master
Updating Spanish translation
2015-09-15 10:31:46 +02:00
Jonathan Li f8104137ce Merge pull request #821 from turtleli/fix-linux-aligned-realloc
Fix _aligned_realloc implementation on linux
2015-09-14 22:51:07 +01:00
IlDucci d78dd0c8d0 Updating Spanish translation
Fixed the SSE2 strings, rewrote other ones. Adding colons where needed.
2015-09-14 12:55:26 +02:00