b879fb84a2
The reason this would never be true is that ideal_processor is a u8 and THREADPROCESSORID_DEFAULT is an s32. In this case, it boils down to how arithmetic conversions are performed before performing the comparison. If an unsigned value has a lesser conversion rank (aka smaller size) than the signed type being compared, then the unsigned value is promoted to the signed value (i.e. u8 -> s32 happens before the comparison). No sign-extension occurs here either. An alternative phrasing: Say we have a variable named core and it's given a value of -2. u8 core = -2; This becomes 254 due to the lack of sign. During integral promotion to the signed type, this still remains as 254, and therefore the condition will always be true, because no matter what value the u8 is given it will never be -2 in terms of 32 bits. Now, if one type was a s32 and one was a u32, this would be entirely different, since they have the same bit width (and the signed type would be converted to unsigned instead of the other way around) but would still have its representation preserved in terms of bits, allowing the comparison to be false in some cases, as opposed to being true all the time. --- We also get rid of two signed/unsigned comparison warnings while we're at it. |
||
---|---|---|
.appveyor | ||
.github | ||
.travis | ||
CMakeModules | ||
dist | ||
externals | ||
hooks | ||
src | ||
.gitignore | ||
.gitmodules | ||
.travis.yml | ||
CMakeLists.txt | ||
CONTRIBUTING.md | ||
Doxyfile | ||
README.md | ||
appveyor.yml | ||
license.txt |
README.md
yuzu emulator
yuzu is an experimental open-source emulator for the Nintendo Switch from the creators of Citra.
It is written in C++ with portability in mind, with builds actively maintained for Windows, Linux and macOS. The emulator is currently only useful for homebrew development and research purposes.
yuzu only emulates a subset of Switch hardware and therefore is generally only useful for running/debugging homebrew applications. At this time, yuzu cannot play any commercial games without major problems. yuzu can boot some games, to varying degrees of success, but does not implement any of the necessary GPU features to render 3D graphics.
yuzu is licensed under the GPLv2 (or any later version). Refer to the license.txt file included.
Check out our website!
For development discussion, please join us on Discord.
Development
Most of the development happens on GitHub. It's also where our central repository is hosted.
If you want to contribute please take a look at the Contributor's Guide and Developer Information. You should as well contact any of the developers on Discord in order to know about the current state of the emulator.
Building
- Windows: Windows Build
- Linux: Linux Build
- macOS: macOS Build
Support
We happily accept monetary donations or donated games and hardware. Please see our donations page for more information on how you can contribute to yuzu. Any donations received will go towards things like:
- Switch consoles to explore and reverse-engineer the hardware
- Switch games for testing, reverse-engineering, and implementing new features
- Web hosting and infrastructure setup
- Software licenses (e.g. Visual Studio, IDA Pro, etc.)
- Additional hardware (e.g. GPUs as-needed to improve rendering support, other peripherals to add support for, etc.)
We also more than gladly accept used Switch consoles, preferably ones with firmware 3.0.0 or lower! If you would like to give yours away, don't hesitate to join our Discord and talk to bunnei. You may also contact: donations@yuzu-emu.org.