This is only ever queried and not set outside of the Core.cpp, so this
should just be hidden internally and just have a function exposed that
allows querying it.
wxQueueEvent/wxPostEvent are useful when the event is being dispatched
to another separate window, but aren't really necessary when the event
will be handled by the same window it's dispatched from.
GetEventHandler() is unnecessary here for the same reason. It's an event
intended to be handled by the dialog itself.
As all UI controls are essentially constructed with new expressions, the
type is already visible on the right-hand side, so repeating the type
twice isn't necessary.
This is an implementation detail that does not have to be exposed.
It was used in WII_IPC whenever the IPC gets reset, but that does not
make much sense to me: the only time when IOS loses state and the IPC
registers are set up again is when it's reloaded. And reloading IOS
already calls Reset() indirectly.
Also, an IPC reset from the PPC definitely should not close all opened
devices!
This also gets rid of a special case for clear_devices, which is now
completely unneeded.
This clashes with X11's preprocessor define named Success (because using
non-prefixed lowercase identifiers in C was apparently a fantastic idea
at some point), causing compilation errors.
Amends the TAS callbacks to internally store functions using
std::function instead of raw function pointers. This allows binding
extra contextual state via lambda functions, as well as keeping the
dialogs internal to the main frame (on top of being a more flexible
interface).
The loop was allocating one-too-many levels, as well as incorrect sizes
for each level. Probably not an issue as mipmapped render targets aren't
used, but the logic should be correct anyway.
Fixes warning:
```
../Source/UnitTests/VideoCommon/VertexLoaderTest.cpp:222:15: error: variable 'f' may be uninitialized when used here [-Werror,-Wconditional-uninitialized]
ExpectOut(f * scale);
^
../Source/UnitTests/VideoCommon/VertexLoaderTest.cpp:198:12: note: initialize the variable 'f' to silence this warning
float f, g;
^
= 0.0
../Source/UnitTests/VideoCommon/VertexLoaderTest.cpp:223:15: error: variable 'g' may be uninitialized when used here [-Werror,-Wconditional-uninitialized]
ExpectOut(g * scale);
^
../Source/UnitTests/VideoCommon/VertexLoaderTest.cpp:198:15: note: initialize the variable 'g' to silence this warning
float f, g;
^
= 0.0
```
This was a regression from the remove-everything-static-from-renderer
PR. As the comment indicates, it would be nice to move all of this logic
out of the Renderer constructor, but this is a much larger change.
This is currently unused and shouldn't actually be a part of the frame's
public interface. The event system should be used instead to dispatch
messages to the game list control if necessary.
This keeps all of the return codes in the same place and exposed
publicly (as they are not internal to ES).
I have also added proper IOSC error codes and renamed some codes
for more consistency. (Unix ones have an E prefix, others do not.)
A set of small changes to handle title imports more accurately.
* Clean up the import directory after an import, exactly like IOS.
This should prevent the title directory from having useless leftover
contents, which could confuse the emulated software.
* More robust failsafe in case an import does not complete normally.
IOS checks for stale imports and handles them appropriately on boot.
We now do the same.
* Create all directories as IOS does. This includes the data directory.
This may fix LIBUSB_ERROR_NOT_FOUND whenever devices end up being in
an unconfigured state. We don't need anything more than the first
config descriptor anyway.
This was a regression introduced by 4d8d045. stored_stack_pointer within
PPCSTATE was being accessed before the PPCSTATE (RBP) register was
initialized.
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;
^
```
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;
^
```
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
```
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, \
```
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.
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.
Fixes warnings:
```
dolphin/Source/Core/Core/PowerPC/BreakPoints.cpp:246:89: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
debug_interface->GetDescription(pc).c_str(), write ? "Write" : "Read", size * 8,
^~~~~~~~
dolphin/Source/Core/Core/PowerPC/BreakPoints.cpp:245:50: warning: field width should have type 'int', but argument has type 'unsigned long' [-Wformat]
NOTICE_LOG(MEMMAP, "MBP %08x (%s) %s%zu %0*x at %08x (%s)", pc,
~~~^
```
Fixes https://bugs.dolphin-emu.org/issues/10159 "Emulated Wii remote
options not working correctly," which was introduced by PR #4856: "Move
'Background Input' out of individual controller configurations."
Instead of each component allocating their own memory, we instead allocate
the memory once and divvy that up among the components as required. This
ensures that relative memory offsets remain within architecture limits.
Constants are copied into this pool so that they live at a memory
location that is close to the code that references it. The pool allocates
memory from a provided X64CodeBlock to use.
The purpose of the pool is to overcome the 32-bit offset limitation that
RIP-relative addressing has.`
Proper semantics.
IOS only cares about the TMD and nothing else, so we should use
FindInstalledTMD, instead of reading/parsing/decrypting a bunch of
useless stuff, which is slow *and* causes issues because of the cache.
If the delimiters of a memory aren't exactly the same as an address, but their size includes the memory breakpoint delimiter, the break will not go through. This makes it so that you can specify a search for a memory breakpoint with a data size and will check if the data fits with that size on all memory breakpoints so the breaks go through.
Apparently the path was changed from using "/thump.png" to using
"/gameId-#.png". We will always use the first screenshot for the game
broswer wich will be "/gameId-1.png"
Saving screenshot was not working due to 2 problems. The first one is that
the view id of the save screenshot in the Android TV fragment doesnt match
the one declared inside the menu_emulation. Second Problem will be fixed
in another commit.
This commit chnage the code to not depend on reusing the ids of the menu
everywhere in the emulator inorder for the onMenuItemClicked to work.
Instead you need to call EmulationActivity.handleMenuAction passing
the action to handle regardless of the ids you are using in the view.
Dolphin assumes that content 0 is opening.bnr, without checking
whether content 0 exists or if it is even supposed to be there (it's
only there for channels). This results in sometimes reading garbage.
This adds a check to only try to read names from content 0's header
if the title is a channel (channel, system channel or game channel).
Trying to return to the Wii Menu from a game is the easiest
way to trigger this error. Just saying 0000000100000002
when that happens doesn't mean much to most users.
The Tools > Load System Menu option displays the version of the
installed Wii Menu. This commit changes the way we display that
version, like so: "Load System Menu 514P" -> "Load System Menu 4.3E"
The numbers are from http://wiibrew.org/wiki/System_Menu
The FrameBufferManager::CreateTexture (from the OpenGL backend) method introduced by commit 69cedf41 incorrectly compares the texture variable (which contains a name provided by glGenTextures) against GL_TEXTURE_2D_MULTISAMPLE_ARRAY and GL_TEXTURE_2D_MULTISAMPLE.
It should instead use the texture_type variable for this (as done in the first branch of the if).