Commit Graph

23831 Commits

Author SHA1 Message Date
Léo Lam 77b389bf99 WX: Move init mutex lock to after command line
Calling std::exit while having a mutex locked leads to an assertion.

Moving the lock is fine, since all it protects against is really just
UICommon.
2017-03-25 23:24:02 +01:00
Markus Wick 86e6b44271 Merge pull request #5146 from ligfx/mmuwarning
MMU: rewrite loop to avoid warning
2017-03-25 23:18:56 +01:00
Michael Maltese 9afe3946d1 JitArm64_Integer: fix signedness comparison warning
Fixes warning:

```
dolphin/Source/Core/Core/PowerPC/JitArm64/JitArm64_Integer.cpp:1139:64: warning: comparison of integers of different signs: 'u32' (aka 'unsigned int') and 'int' [-Wsign-compare]
  else if (gpr.IsImm(b) && gpr.GetImm(b) != 0 && gpr.GetImm(b) != -1)
                                                 ~~~~~~~~~~~~~ ^  ~~
```
2017-03-25 14:51:10 -07:00
Michael Maltese 428bac6e32 JitArm64_Integer: remove unused imm_neg 2017-03-25 14:51:10 -07:00
Michael Maltese 5892ef1792 JitArm64_Integer: extract bit operation lambdas
Fixes warnings like:

```
dolphin/Source/Core/Core/PowerPC/JitArm64/JitArm64_Integer.cpp:132:37: warning: declaration shadows a local variable [-Wshadow]
    reg_imm(a, s, inst.UIMM, [](u32 a, u32 b) { return a | b; }, &ARM64XEmitter::ORRI2R);
                                    ^
/Users/michaelmaltese/Downloads/dolphin/Source/Core/Core/PowerPC/JitArm64/JitArm64_Integer.cpp:122:7: note: previous declaration is here
  u32 a = inst.RA, s = inst.RS;
      ^
```
2017-03-25 14:51:09 -07:00
Michael Maltese 3d7bace9da Arm64Emitter: extract lambda to AddImmediate()
Fixes warning:

```
Source/Core/Common/Arm64Emitter.cpp:4108:31: error: declaration shadows a local variable [-Werror,-Wshadow]
    auto addi = [this](ARM64Reg Rd, ARM64Reg Rn, u64 imm, bool shift, bool negative, bool flags) {
                                ^
  /var/lib/buildbot/slave/pr-android/build/Source/Core/Common/Arm64Emitter.cpp:4105:46: note: previous declaration is here
  void ARM64XEmitter::ADDI2R_internal(ARM64Reg Rd, ARM64Reg Rn, u64 imm, bool negative, bool flags,
                                               ^
```
2017-03-25 14:21:19 -07:00
Michael Maltese c58ba93503 Arm64: Use PRIi64/PRIx64 for printf 2017-03-25 14:20:44 -07:00
Michael Maltese 4cd9a2ef1e DiscIO: make sure to initialize out args to ReadSwapped
Fixes warnings:

```
../Source/Core/DiscIO/VolumeGC.cpp: In member function 'virtual u8 DiscIO::CVolumeGC::GetDiscNumber() const':
../Source/Core/DiscIO/VolumeGC.cpp:178:10: error: 'disc_number' may be used uninitialized in this function [-Werror=maybe-uninitialized]
   return disc_number;
          ^
../Source/Core/DiscIO/VolumeWiiCrypted.cpp: In member function 'virtual u8 DiscIO::CVolumeWiiCrypted::GetDiscNumber() const':
../Source/Core/DiscIO/VolumeWiiCrypted.cpp:258:10: error: 'disc_number' may be used uninitialized in this function [-Werror=maybe-uninitialized]
   return disc_number;
          ^
../Source/Core/DiscIO/VolumeWiiCrypted.cpp: In member function 'virtual IOS::ES::TMDReader DiscIO::CVolumeWiiCrypted::GetTMD() const':
../Source/Core/DiscIO/VolumeWiiCrypted.cpp:123:20: error: 'tmd_address' may be used uninitialized in this function [-Werror=maybe-uninitialized]
   tmd_address <<= 2;
                    ^
```
2017-03-25 13:50:23 -07:00
Lioncash 57c21b9576 TextureCacheBase: Convert bound_textures from a C array to a std::array
Prevents array-to-pointer decay and simplifies some code.
2017-03-25 14:53:25 -04:00
Markus Wick 4d8d0451e3 Merge pull request #5142 from MerryMage/stored_stack_pointer
JitAsm: Use stored_stack_pointer instead of s_saved_rsp
2017-03-25 17:37:48 +01:00
Markus Wick 3898707ef9 Merge pull request #5141 from MerryMage/ConvertDoubleToSingle
EmuCodeBlock: Place ConvertDoubleToSingle temporaries on the stack
2017-03-25 17:37:29 +01:00
Mahdi Hijazi 8f2f833f9d Update to Android SDK 25
This handles the new permission system in Android M.
2017-03-25 14:55:15 +01:00
JosJuice 8709653985 Automatic translation resources sync with Transifex 2017-03-25 13:25:33 +01:00
Mahdi Hijazi f1fd336a03 Change the color of the selected slot to make it more visible
On Android TV the selected slot is not cleary hilighted, this is to fix
that but changing the selected slot text color to blue.
2017-03-25 09:55:53 +01:00
Michael Maltese 0c28ff2acc CoreTimingTest: make AdvanceAndCheck() static (fix warning)
Fixes warning:

```
../Source/UnitTests/Core/CoreTimingTest.cpp: In function 'void AdvanceAndCheck(u32, int, int, int)':
../Source/UnitTests/Core/CoreTimingTest.cpp:52:6: error: no previous declaration for 'void AdvanceAndCheck(u32, int, int, int)' [-Werror=missing-declarations]
 void AdvanceAndCheck(u32 idx, int downcount, int expected_lateness = 0, int cpu_downcount = 0)
      ^
```
2017-03-24 21:37:34 -07:00
Anthony b099a1c02a Merge pull request #5135 from lioncash/ini
IniFile: Minor changes
2017-03-24 19:33:09 -07:00
Anthony e2a7e8a40d Merge pull request #5143 from JosJuice/wii-menu-region-log
Clarify the log message for unknown Wii Menu regions
2017-03-24 19:31:52 -07:00
Matthew Parlane 15d0e91bf6 Merge pull request #5150 from JosJuice/di-buffer-speed-comment
DVDInterface: Update comment about buffer speed
2017-03-25 14:52:23 +13:00
Matthew Parlane d8fa465482 Merge pull request #5154 from ligfx/bitutilstestsignedness
BitUtilsTest: compare ints of the same signedness (fixes warnings)
2017-03-25 14:51:47 +13:00
Sepalani 6eca605284 Fix wrong address in zz_ symbol name 2017-03-25 01:21:13 +00:00
Michael Maltese 04db3d5a50 UnitTests: use EXPECT_TRUE/EXPECT_FALSE (fixes warnings)
Using `EXPECT_EQ` with boolean literals can cause a warning in certain
versions of GCC. See https://github.com/google/googletest/issues/322

Fixes warnings:

```
../Source/UnitTests/Common/BitSetTest.cpp: In member function 'virtual void BitSet_Basics_Test::TestBody()':
../Source/UnitTests/Common/BitSetTest.cpp:15:165: error: converting 'false' to pointer type for argument 1 of 'char testing::internal::IsNullLiteralHelper(testing::internal::Secret*)' [-Werror=conversion-null]
../Source/UnitTests/Common/BitSetTest.cpp: In member function 'virtual void BitSet_BitGetSet_Test::TestBody()':
../Source/UnitTests/Common/BitSetTest.cpp:27:165: error: converting 'false' to pointer type for argument 1 of 'char testing::internal::IsNullLiteralHelper(testing::internal::Secret*)' [-Werror=conversion-null]
../Source/UnitTests/Common/StringUtilTest.cpp: In member function 'virtual void StringUtil_StringBeginsWith_Test::TestBody()':
../Source/UnitTests/Common/StringUtilTest.cpp:23:165: error: converting 'false' to pointer type for argument 1 of 'char testing::internal::IsNullLiteralHelper(testing::internal::Secret*)' [-Werror=conversion-null]
../Source/UnitTests/Common/StringUtilTest.cpp:25:165: error: converting 'false' to pointer type for argument 1 of 'char testing::internal::IsNullLiteralHelper(testing::internal::Secret*)' [-Werror=conversion-null]
../Source/UnitTests/Common/StringUtilTest.cpp:26:165: error: converting 'false' to pointer type for argument 1 of 'char testing::internal::IsNullLiteralHelper(testing::internal::Secret*)' [-Werror=conversion-null]
../Source/UnitTests/Common/StringUtilTest.cpp:27:165: error: converting 'false' to pointer type for argument 1 of 'char testing::internal::IsNullLiteralHelper(testing::internal::Secret*)' [-Werror=conversion-null]
../Source/UnitTests/Common/StringUtilTest.cpp: In member function 'virtual void StringUtil_StringEndsWith_Test::TestBody()':
../Source/UnitTests/Common/StringUtilTest.cpp:35:165: error: converting 'false' to pointer type for argument 1 of 'char testing::internal::IsNullLiteralHelper(testing::internal::Secret*)' [-Werror=conversion-null]
../Source/UnitTests/Common/StringUtilTest.cpp:37:165: error: converting 'false' to pointer type for argument 1 of 'char testing::internal::IsNullLiteralHelper(testing::internal::Secret*)' [-Werror=conversion-null]
../Source/UnitTests/Common/StringUtilTest.cpp:38:165: error: converting 'false' to pointer type for argument 1 of 'char testing::internal::IsNullLiteralHelper(testing::internal::Secret*)' [-Werror=conversion-null]
../Source/UnitTests/Common/StringUtilTest.cpp:39:165: error: converting 'false' to pointer type for argument 1 of 'char testing::internal::IsNullLiteralHelper(testing::internal::Secret*)' [-Werror=conversion-null]
c
```
2017-03-24 17:26:27 -07:00
Michael Maltese 9234ed82da BitUtilsTest: compare ints of the same signedness (fixes warnings)
Fixes warnings like:

```
dolphin/Source/UnitTests/Common/BitUtilsTest.cpp:5:
../Externals/gtest/googletest/include/gtest/gtest.h:1392:11: warning: comparison of integers of different signs: 'const unsigned long' and 'const int' [-Wsign-compare]
  if (lhs == rhs) {
      ~~~ ^  ~~~
../Externals/gtest/googletest/include/gtest/gtest.h:1421:12: note: in instantiation of function template specialization 'testing::internal::CmpHelperEQ<unsigned long, int>' requested here
    return CmpHelperEQ(lhs_expression, rhs_expression, lhs, rhs);
           ^
dolphin/Source/UnitTests/Common/BitUtilsTest.cpp:12:3: note: in instantiation of function template specialization 'testing::internal::EqHelper<false>::Compare<unsigned long, int>' requested here
  EXPECT_EQ(Common::BitSize<s8>(),  8);
  ^
../Externals/gtest/googletest/include/gtest/gtest.h:1924:63: note: expanded from macro 'EXPECT_EQ'
                      EqHelper<GTEST_IS_NULL_LITERAL_(val1)>::Compare, \
```
2017-03-24 17:15:37 -07:00
Michael Maltese 5d69e99943 StubHost: remove unused Host_RequestFullscreen()
Fixes warning:

```
../Source/UnitTests/TestUtils/StubHost.cpp: In function 'void Host_RequestFullscreen(bool)':
../Source/UnitTests/TestUtils/StubHost.cpp:39:6: error: no previous declaration for 'void Host_RequestFullscreen(bool)' [-Werror=missing-declarations]
 void Host_RequestFullscreen(bool)
      ^
```
2017-03-24 16:41:12 -07:00
Mahdi Hijazi ba935d40ba [Android] Load the game banner from the iso and use if no screenshot is available
It doesn't look that good since the banners are 96x32 but it still better
than nothing.
2017-03-24 21:26:48 +01:00
JosJuice f5469878ba DVDInterface: Update comment about buffer speed
The actual code was changed based on mmastrac's hardware
tests, but it seems like we forgot to edit this comment.
2017-03-24 20:04:26 +01:00
Michael Maltese a098fe57c5 IP/Top: rename private methods à la HandleXRequest
Fixes this warning everytime Top.h is included:

```
../Source/Core/Core/IOS/Network/IP/Top.h:76:20: warning: 'IOS::HLE::Device::NetIPTop::Close' hides overloaded virtual function [-Woverloaded-virtual]
  IPCCommandResult Close(const IOCtlRequest& request);
                   ^
../Source/Core/Core/IOS/Device.h:158:16: note: hidden overloaded virtual function 'IOS::HLE::Device::Device::Close' declared here: different number of parameters (0 vs 1)
  virtual void Close();
               ^
```
2017-03-24 11:52:39 -07:00
Michael Maltese 8387b00f42 MMU: rewrite loop to avoid warning
Fixes warning:

```
dolphin/Source/Core/Core/PowerPC/MMU.cpp:278:43: warning: shift count >= width of type [-Wshift-count-overflow]
           addr++, addr_translated++, val >>= 8)
```
2017-03-24 11:45:21 -07:00
JosJuice a31bb7a27c Clarify the log message for unknown Wii Menu regions
Saying just "title" made it seem like we are showing the title
ID, but what we actually are showing is the title version.
2017-03-24 16:44:38 +01:00
MerryMage 61198199cd JitAsm: Use stored_stack_pointer instead of s_saved_rsp 2017-03-24 11:31:40 +00:00
MerryMage 918d7fa3d1 EmuCodeBlock: Place ConvertDoubleToSingle temporaries on the stack 2017-03-24 10:59:55 +00:00
Matthew Parlane c5cc781205 Merge pull request #5131 from ligfx/discioswitchdefault
DiscIO: add empty UNKNOWN_REGION case (fixes warning)
2017-03-24 16:50:56 +13:00
Michael Maltese 0767c3d94d DiscIO: add empty UNKNOWN_REGION case (fixes warning)
Fixes warning:

```
dolphin/Source/Core/DiscIO/Enums.cpp:171:11: warning: enumeration value 'UNKNOWN_REGION' not handled in switch [-Wswitch]
  switch (GetSysMenuRegion(title_version))
          ^
```
2017-03-23 20:14:11 -07:00
Lioncash b711daee5f BitField: Get rid of a C-style cast
This can simply be the max value of the unsigned type.
2017-03-23 15:28:58 -04:00
Lioncash e43c495ce5 BitField: Convert typedefs to using aliases 2017-03-23 15:28:50 -04:00
Lioncash caef08988e BitField: Make mostly constexpr capable
Makes the constructor and retrieval functions constexpr.
2017-03-23 11:45:45 -04:00
Markus Wick 6e2e48e9ea Merge pull request #5137 from lioncash/arm
Arm64Emitter: Get rid of pointer casts in PoisonMemory
2017-03-23 15:52:58 +01:00
Markus Wick 4b5995a6e0 Merge pull request #5138 from lioncash/init
VertexLoaderBase: In-class initialize class members where applicable
2017-03-23 15:15:32 +01:00
Lioncash da2e34f69b VertexLoaderBase: In-class initialize class members where applicable
Same thing, less code.
2017-03-23 08:37:18 -04:00
Lioncash a7ec2d3831 Arm64Emitter: Get rid of pointer casts in PoisonMemory
The previous code invokes undefined behavior.
2017-03-23 07:10:21 -04:00
Markus Wick 6d065a02b5 Merge pull request #5134 from degasus/texture_cache
TextureCache: Don't lock freed rendertargets for one frame.
2017-03-23 09:48:32 +01:00
Matthew Parlane 6a17d87b07 Merge pull request #5136 from lioncash/ar
ARDecrypt: const correctness
2017-03-23 14:45:48 +13:00
Lioncash 1d6d85963f ARDecrypt: const correctness 2017-03-22 20:35:00 -04:00
Lioncash 29ca22905b IniFile: Replace a character erase with pop_back()
Same thing, more straightforward.
2017-03-22 19:32:10 -04:00
Lioncash 35959bdaf9 IniFile: Replace string joining code with JoinString 2017-03-22 19:30:15 -04:00
Lioncash b92871111a IniFile: std::move a std::string in GetLines
Also gets rid of an unnecessary string copy.
2017-03-22 19:09:25 -04:00
Lioncash dbdf693c81 IniFile: Use character literals instead of string literals where applicable
Character overloads are generally better overall (range checks aren't
necessary, etc).
2017-03-22 19:03:17 -04:00
Lioncash d8998b6392 IniFile: Provide an rvalue reference overload for SetLines
Allows moving in vectors instead of performing an unnecessary copy.
2017-03-22 18:49:13 -04:00
Lioncash 46d74a7760 IniFile: Make Section's string constructor instances take strings by value
As the name is immediately stored into a class member, a move here is a
better choice.

This also moves the constructor implementations into the cpp file to
avoid an otherwise unnecessary inclusion in the header. This is also
likely a better choice as Section contains several non-trivial members,
so this would avoid potentially inlining a bunch of setup and teardown
code related to them as a side-benefit.
2017-03-22 18:47:19 -04:00
degasus ca8d9e2215 TextureCache: Don't lock freed rendertargets for one frame.
New Super Mario Bros on PAL still renders at 60 fps, but skips every 5th XFB copy.
So our detection of "per frame" fails, and we require twice the amound of texture objects.
But our pool frees unused textures after 3 frames, so half of them needs to be reallocated
every few frames.

This commit removes the lock for render targets. It was introduced to not update a texture
while it is still in use. But render targets aren't updated while rendering, so this
lock isn't needed. Non-rendertarget textures however aren't as dynamic, so the lock should
have no performance update.
2017-03-22 23:28:42 +01:00
Lioncash 99adc73383 IniFile: Make Section constructor explicit 2017-03-22 18:07:23 -04:00