Commit Graph

9166 Commits

Author SHA1 Message Date
Gregory Hainaut 0f4cc3231a i10n: upload precompiled es file 2016-08-20 18:23:48 +02:00
Jonathan Li 2b2042e1c2 gsdx: Allow screenshot compression level to be changed
At higher resolutions it takes too much time to save a screenshot at the
maximum compression level. So let's allow the user to set the
compression level.

This re-uses the png_compression_level setting. The default compression
level is 1 for speed, but if the user wishes to increase the compression
level (without using an external tool) and doesn't mind if the
screenshot takes more time to save then they can increase the
compression level up to a maximum of 9 (which can take quite a while).

Fixes #1527.
2016-08-20 14:01:24 +01:00
Nicolas Hillegeer 57090e8ec5 build.sh: simplify and semi-modernize
1. All POSIX shells support $(...) syntax [1], including /bin/sh. shellcheck
   warns about it.
2. [[ won't work in /bin/sh [2], so use [ everywhere. I wonder why it worked
   now, perhaps the test was running on a system where /bin/sh -> /bin/bash.
3. In POSIX sh, string indexing is undefined. [SC2039]. Unfortunately, this
   means we require a subprocess: https://wiki.ubuntu.com/DashAsBinSh. Very
   ugly.
4. In POSIX sh, arrays are undefined. We seem to use $flags as an array
   after constructing it by string concatenation. I tried to verify that
   this has the same effect as just passing the quoted string in bash:

      bash-3.2$ flags="-DCMAKE_GOOK"
      bash-3.2$ flags="$flags -DCMAKE_MOARMA"
      bash-3.2$ flags="$flags -DCMAKE_URURURUR"
      bash-3.2$ ./argv $flags
      0: ./argv
      1: -DCMAKE_GOOK
      2: -DCMAKE_MOARMA
      3: -DCMAKE_URURURUR
      bash-3.2$ ./argv "${flags[@]}"
      0: ./argv
      1: -DCMAKE_GOOK -DCMAKE_MOARMA -DCMAKE_URURURUR
      bash-3.2$ ./argv "$flags"
      0: ./argv
      1: -DCMAKE_GOOK -DCMAKE_MOARMA -DCMAKE_URURURUR
      bash-3.2$

5. Enable exit on unknown variable (-u). All variables should be known,
   otherwise we have an error in the script. shellcheck doesn't warn so I
   think it's fine.

Apart from shellcheck(1), I also ran checkbashisms(1). The latter only
reported that "command -v" might not be available in other shells.
Apparently only ash(1) doesn't understand it.

NOTE: Why are we even trying to support pre-Mavericks (Darwin < 13) OSX? We
don't even support the most modern OSX (El Capitan) fully yet. OSX upgrades
are free and generally don't leave old machines behind. Most machines made
after 2009 can upgrade to El Capitan, AFAIK. I also believe that systems
that have all the utilities and libraries necessary to build PCSX2 will have
/bin/bash >= 3.x.

NOTE 2: Does cmake/ninja generate the same type of output in
compile_commands.json?

[1]: http://pubs.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html#tag_02_06_03
[2]: http://serverfault.com/a/52050
2016-08-20 13:15:57 +02:00
Gregory Hainaut d6b834e8af gsdx hw: don't execute blit fmv with target
Avoid invalid operation due to depth buffer
2016-08-20 12:56:30 +02:00
Gregory Hainaut fa826b3167 gsdx tc: check compatible bit when wrote in middle of target
All maths are wrong otherwise. Fix half screen issue in WRC
2016-08-20 11:57:15 +02:00
Gregory Hainaut a49b3c9bf6 gsdx tc: log more stuff on texture cache dirty & frame format 2016-08-20 11:52:22 +02:00
Gregory Hainaut cdfbff9af0 build.sh: use command -v instead of which 2016-08-19 18:21:42 +02:00
FlatOutPS2 87eed3965e GSDx GSRendererDX code improvement
Replace local copies context and env with m_ prefix originals.
2016-08-19 16:02:49 +02:00
FlatOutPS2 c5cd716c20 Gsdx alpha test improvement DX
Port for the DX renderers of the alpha test improvement for OGL created by gregory38.
2016-08-19 15:59:54 +02:00
Gregory Hainaut 02cfe9aeeb Merge pull request #1520 from IlDucci/master
Updating Spanish translation
2016-08-19 09:55:41 +02:00
Gregory Hainaut d87452ed21 build.sh: allow to replace make by ninja to speed up the build system
Quick benchmark. GCC debug mode
Full build: 6 second better, it can 2 additional cores :)
make : ./build.sh --dbg --clean  213.25s user 22.35s system 881% cpu 26.739 total
ninja: ./build.sh --dbg --clean  203.94s user 18.31s system 1085% cpu 20.474 total

No change build:: 1 second better :)
 make -C build_dbg -j 16 install  1.51s user 0.34s system 206% cpu 0.898 total
ninja -C build_dbg -j 16 install  0.05s user 0.02s system 98% cpu 0.074 total
2016-08-18 22:45:46 +02:00
Jonathan Li 029468e7b4 ci: Add clang 3.8 to Travis CI 2016-08-17 22:07:42 +01: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
Jonathan Li f338ffea74 console: Remove scrollbar mouse drag pause behaviour
If the dev/verbose logging option is enabled and the game requires
automatic gamefixes, the console log will always scroll to the bottom
when the scrollbar is released since a new log message will be output
when emulation unpauses.

This could be quite annoying when checking a log while the game is
running. The behaviour doesn't seem to be all that useful anymore
(previously it was useful to work around a GUI bug where the automatic
gamefixes/widescreen patches/cheats menu options didn't apply
immediately) and only works on Windows, so let's remove it.
2016-08-17 22:07:42 +01:00
Gregory Hainaut 765b68458a gsdx: improve logging
Don't enable UpdateValidity print by default (+20~25% on log size)
Only useful in rare cases
2016-08-17 21:23:06 +02:00
Gregory Hainaut 15a4d1f0a9 pcsx2: fix gcc warning
MIPSAnalyst.cpp:124:9: warning: ‘takeBranch’ may be used uninitialized in this function [-Wmaybe-uninitialized]
    else if (sure && !takeBranch)

False positive as sure will be false but safer this way
2016-08-17 21:23:06 +02: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
Jonathan Li d36002a02a gsdx:cmake: Use PNG_LIBRARIES instead of PNG_LIBRARY
PNG_LIBRARIES adds both libpng and zlib to the command line.
PNG_LIBRARY only adds libpng to the linker command line, and the cmake
documentation also suggests not to use it.
2016-08-16 20:35:21 +01:00
IlDucci fa5effafcd Updating Spanish translation
Added the new shortcut identifiers. Warning: Some strings are shown in
English.
2016-08-16 13:40:09 +02:00
Gregory Hainaut fa249a3f78 gsdx ogl: don't rely on the Z value in m_vt
Value seems wrongly rounded and you can't distinguish 0xFFFF from 0xFFFE

Instead check that depth is constant for the draw call and the value from the vertex buffer

Fix recent regression on GTA (and likely various games)
2016-08-16 07:30:52 +02:00
FlatOutPS2 c8f6d68d68 PCSX2: IPU end of video freeze fix
Fixes end of video freeze in Enthusia - Professional Racing.
2016-08-15 19:48:21 +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 252c043409 Merge pull request #1518 from PCSX2/pcsx2-high-level-fopen
Pcsx2 high level fopen
2016-08-15 15:41:27 +02:00
Pseudonym 07e21427b9 When PS1 loading was enabled, someone neglected to check that allowing the function to continue wouldn't cause any problems.
Fixes #1515
2016-08-15 14:23:43 +01:00
Gregory Hainaut 0f1c10230a CDVD: catch MEC/NVM file exception
It will stop the emulation and open a nice box with an error message instead of terminate PCSX2
2016-08-15 14:09:01 +02:00
Gregory Hainaut deb7121fde CDVD: Use wxFFile API to handle MEC file too
again nicer, exception safe, less compilation warning :)

v2:
* check file is properly opened in write mode
* only print an error when result is bad
2016-08-15 13:08:54 +02:00
Gregory Hainaut 534e01e2d6 CDVD: Use wxFFile API to handle NVM file
Nicer, exception safe, less compilation warning :)

v2: check fp is properly open in write mode
2016-08-15 13:06:34 +02:00
Gregory Hainaut 5c7e2432bd gsdx-ogl: improve alpha test for GTA vice city (letters)
I don't understand why but it seems depth is rounded down even in 16 bits.
So uses 0xFFFE to enable ate_all_color_then_depth in 16 bits format too :)
2016-08-15 11:38:07 +02:00
Gregory Hainaut 5fbf702500 gsdx ogl: new optimization to bypass the alpha test
In FB_ONLY mode the alpha test impacts (discard) only the depth value.
If there is no depth buffer, we don't care about depth write. So alpha
test is useless and we can do the draw with a single draw call and no program
switch
2016-08-15 11:35:24 +02:00
Gregory Hainaut b62859ffa2 gsdx ogl: only enable the alternate alpha test in FB_ONLY
RGB_ONLY requires to handle the alpha channel in the alpha test
2016-08-15 11:25:19 +02:00
Gregory Hainaut 2700f06fe7 Merge branch 'pcsx2-verbose-thread-error' 2016-08-14 22:31:28 +02:00
Gregory Hainaut 63ec74ebea build: remove most of the bashism
Various distribution still ship the true old shell to win 1 second at startup.
Besides, bash syntax is no way better

Not fully tested, some bashism might remain for some options but at least you can
do a standard build
2016-08-14 22:29:12 +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 0417a10483 gsdx: allow strict aliasing optimization 2016-08-14 21:01:40 +02:00
Gregory Hainaut 2e7fab7813 gsdx sw: avoid aliasing issue, clear function was wrong anyway
Value must be un-normalized. Function is only used with 0.0 so
API was updated to only use the 0 case.
2016-08-14 21:01:09 +02:00
Gregory Hainaut ef7530af29 microVU: fix aliasing issue
Union is safer for the compiler
2016-08-14 20:49:12 +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 90707f8d4e gsdx: avoid aliasing issue
Extend GSVector to support float move

Initial code likely used integer move for performance reason. However due to
the nan correction, register is now in float domain.
2016-08-14 20:48:34 +02:00
Gregory Hainaut cc15a9480b clang format: disable vertical alignment
Avoid issue of bad alignment on some versions
To reduce change impact
2016-08-14 20:47:36 +02:00
Gregory Hainaut 447e0d0336 Merge pull request #1514 from PCSX2/gsdx-nouveau-driver
Gsdx alpha test improvement
2016-08-14 20:29:09 +02:00
Gregory Hainaut 15db7eeb81 gsdx: use correct format in printf
u => unsigned
d => signed

zu => size_t
2016-08-13 12:48:35 +02:00
Gregory Hainaut 0a1454ff6c gsdx: use prefix increment operator for non-primitive type
I think compiler is clever enough to optimize the code but it won't hurt
and it reduces the number of cpp check warning.
2016-08-12 23:11:26 +02:00
Gregory Hainaut dc2864ad7a gsdx hw: avoid a null deferenced false-positive in coverity
It is a false positive because it supposes that PRIM->TME is both true and false.

It is the first Schrodinger's variable ;)
2016-08-12 23:02:06 +02:00
Gregory Hainaut 2d2fdd6e44 debugger: remove useless null check
It is done too late.
CID 168625 (#1 of 1): Dereference before null check (REVERSE_INULL)
check_after_deref: Null-checking this->cpu suggests that it may be null, but it has already been dereferenced on all paths leading to the check.
2016-08-12 22:57:09 +02:00
Gregory Hainaut f38cd9d80d onepad: add a missing break when CMD_CONFIG_MODE is true but configuration isn't enabled.
I hope it wasn't done on purpose.

CID 168624 (#1 of 1): Missing break in switch (MISSING_BREAK)
unterminated_case: The case for value CMD_CONFIG_MODE is not terminated by a 'break' statement.
2016-08-12 22:55:19 +02:00
Gregory Hainaut 1a09712f89 gsdx: init m_custom_width/height to a default value
Avoid useless warning on coverity
2016-08-12 22:48:20 +02:00
Gregory Hainaut c41cf6c444 gsdx: init variable in constructor
CID 168626 (#1 of 1): Uninitialized scalar field
uninit_member: Non-static class member m_end_block is not initialized in this constructor nor in any functions that it calls.
2016-08-12 22:45:17 +02:00