VERY experimental Nintendo Switch 2 emulator
C++
[meta] Discourage profanity usage (#4239)
cruetera3d32a18b88b
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.mdindex 5129c4e84e..c09b1c3679 100644--- a/CONTRIBUTING.md+++ b/CONTRIBUTING.md@@ -22,9 +22,13 @@ Eden is free, open-source, copyleft software, licensed under the terms of the [G- No LLM or AI usage, *period*, for patches, pull requests, issues, comments, debugging, brainstorming, etc.- For details on why, see the [detailed AI policy](docs/policies/AI.md).+- Usage of any form of profanity or otherwise unsavory language is generally discouraged.+ - This is primarily because it rarely helps to actually understand what's going on.+ - Remember that your comments should be focused and actually address what's happening. With very few exceptions, expletives are actively detrimental at best.- New code must follow the same general style as the surrounding codebase. Exceptions may be granted in certain cases.- Maintainers reserve the right to change your patches and pull requests at will. We will try to avoid this.- - You should respect all decisions made by the [code owners](docs/CODEOWNERS) in your particular subsystem. If you feel they are overstepping or are incorrect, don't be afraid to stand your ground!+ - You should generally respect all decisions made by the [code owners](docs/CODEOWNERS) in your particular subsystem.+ - However, if you feel they are overstepping or are incorrect, don't be afraid to stand your ground! Maintainers are not always correct.- While we do *not* adhere to the terms of a formal code of conduct, you will generally be expected to respect other developers, contributors, and community members.- You **must** have basic knowledge of [Git](https://git-scm.com/learn). Knowing how to manage your branches and follow proper fork policies is a necessity.diff --git a/docs/policies/Coding.md b/docs/policies/Coding.mdindex c5efc8521d..a1d3987057 100644--- a/docs/policies/Coding.md+++ b/docs/policies/Coding.md@@ -34,7 +34,7 @@ Everyone has their own way of viewing good/bad C++ practices, my general outline- The reason is because the project has `-fno-rtti` disabled by default, due to the costs of dynamic polymorphism.- Always copy-on-value for objects with `sizeof(void *) >= sizeof(T) * 2`, i.e objects sized as 2 pointers or less, for bigger objects you can use ref/pointer as usual.- Try using move semantics instead of references, whenever possible.-- Remember function parameters are extremelly cheap as fuck, don't be afraid to place upto 8 parameters on a given function.+- Function parameters are cheap. Don't be afraid to use as many as needed (API usability permitting).- Don't save a reference in structures of a parent object, i.e:```c++diff --git a/externals/stb/stb_image.h b/externals/stb/stb_image.hindex 5e807a0a6e..2a97c1a2a7 100644--- a/externals/stb/stb_image.h+++ b/externals/stb/stb_image.h@@ -1177,7 +1177,7 @@ static void *stbi__load_main(stbi__context *s, int *x, int *y, int *comp, int re#endif#ifndef STBI_NO_TGA- // test tga last because it's a crappy test!+ // test tga last because it's a bad test!if (stbi__tga_test(s))return stbi__tga_load(s,x,y,comp,req_comp, ri);#endif@@ -7662,7 +7662,7 @@ static int stbi__info_main(stbi__context *s, int *x, int *y, int *comp)if (stbi__hdr_info(s, x, y, comp)) return 1;#endif- // test tga last because it's a crappy test!+ // test tga last because it's a bad test!#ifndef STBI_NO_TGAif (stbi__tga_info(s, x, y, comp))return 1;diff --git a/src/core/hle/service/pctl/parental_control_service.h b/src/core/hle/service/pctl/parental_control_service.hindex 1c96360561..58e3b6123f 100644--- a/src/core/hle/service/pctl/parental_control_service.h+++ b/src/core/hle/service/pctl/parental_control_service.h@@ -1,4 +1,4 @@-// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project+// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project// SPDX-License-Identifier: GPL-3.0-or-later// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator@@ -84,7 +84,7 @@ private:RestrictionSettings restriction_settings{};std::array<char, 8> pin_code{};Capability capability{};- // TODO: this is RAW as fuck+ // TODO: this is rawPlayTimerSettings raw_play_timer_settings{};KernelHelpers::ServiceContext service_context;diff --git a/src/core/hle/service/set/system_settings_server.cpp b/src/core/hle/service/set/system_settings_server.cppindex 7fa74e6689..52642e37f7 100644--- a/src/core/hle/service/set/system_settings_server.cpp+++ b/src/core/hle/service/set/system_settings_server.cpp@@ -1020,7 +1020,7 @@ Result ISystemSettingsServer::GetBatteryLot(Out<BatteryLot> out_battery_lot) {c.lot_number[1] = 'H';c.lot_number[2] = 'A';c.lot_number[3] = 'C';- // TODO: I have no fucking idea what the letters mean+ // TODO: what do the letters mean?c.lot_number[4] = 'H';c.lot_number[5] = 'Z';c.lot_number[6] = 'Z';diff --git a/src/core/internal_network/network.cpp b/src/core/internal_network/network.cppindex 75c7bc46aa..01d37fb35b 100644--- a/src/core/internal_network/network.cpp+++ b/src/core/internal_network/network.cpp@@ -531,7 +531,8 @@ int TranslateTypeToNative(Type type) {NETWORK_PROTOCOL_TRANSLATE_ELEM(MPLS) \NETWORK_PROTOCOL_TRANSLATE_ELEM(PFSYNC)#elif defined(__linux__)-// Other platforms get fucked+// Other platforms may not support some niche protocols.+// This is usually not an issue#define NETWORK_PROTOCOL_TRANSLATE_LIST \NETWORK_PROTOCOL_TRANSLATE_ELEM(IP) \/*NETWORK_PROTOCOL_TRANSLATE_ELEM(HOPOPTS)*/ \diff --git a/src/dynarmic/src/dynarmic/backend/x64/a32_interface.cpp b/src/dynarmic/src/dynarmic/backend/x64/a32_interface.cppindex 097e0f426f..1a6d1205fb 100644--- a/src/dynarmic/src/dynarmic/backend/x64/a32_interface.cpp+++ b/src/dynarmic/src/dynarmic/backend/x64/a32_interface.cpp@@ -234,7 +234,7 @@ private:BlockOfCode block_of_code;A32EmitX64 emitter;Optimization::PolyfillOptions polyfill_options;- // Keep it here, you don't wanna mess with the fuckery that's initializer lists+ // Keep it here in order to not mess with initializer listsconst A32::UserConfig conf;Jit* jit_interface;diff --git a/src/dynarmic/src/dynarmic/backend/x64/emit_x64_vector_floating_point.cpp b/src/dynarmic/src/dynarmic/backend/x64/emit_x64_vector_floating_point.cppindex 68ffb2475b..0ad3b022d0 100644--- a/src/dynarmic/src/dynarmic/backend/x64/emit_x64_vector_floating_point.cpp+++ b/src/dynarmic/src/dynarmic/backend/x64/emit_x64_vector_floating_point.cpp@@ -2160,8 +2160,6 @@ void EmitFPVectorToFixed(BlockOfCode& code, EmitContext& ctx, IR::Inst* inst) {ROUNDING_MODE_CASE(CASE, 0x3e) \ROUNDING_MODE_CASE(CASE, 0x3f)- // FUCK YOU MSVC, FUCKING DEPTH CANT EVEN HANDLE 8+16+32+64 DEPTH OF A ELSE STATMENT YOU FUCKING STUPID- // BURN MSVC BURN IT STUPID COMPILER CAN'T EVEN COMPILE THE MOST BASIC C++ROUNDING_MODE_SWITCH(ToNearest_TieEven)ROUNDING_MODE_SWITCH(TowardsPlusInfinity)ROUNDING_MODE_SWITCH(TowardsMinusInfinity)diff --git a/src/dynarmic/src/dynarmic/ir/opt_passes.cpp b/src/dynarmic/src/dynarmic/ir/opt_passes.cppindex fb51ba4998..2b972cbdf4 100644--- a/src/dynarmic/src/dynarmic/ir/opt_passes.cpp+++ b/src/dynarmic/src/dynarmic/ir/opt_passes.cpp@@ -787,7 +787,7 @@ static void FoldCountLeadingZeros(IR::Inst& inst, bool is_32_bit) {/// Folds division operations based on the following:////// 1. x / 0 -> 0 (NOTE: This is an ARM-specific behavior defined in the architecture reference manual)-/// 2a. 0x8000_0000 / 0xFFFF_FFFF -> 0x8000_0000 (NOTE: More ARM bullshit)+/// 2a. 0x8000_0000 / 0xFFFF_FFFF -> 0x8000_0000 (NOTE: More ARM errata)/// 2b. 0x8000_0000_0000_0000 / 0xFFFF_FFFF_FFFF_FFFF -> 0x8000_0000_0000_0000/// 3. imm_x / imm_y -> result/// 4. x / 1 -> xdiff --git a/src/input_common/drivers/android.cpp b/src/input_common/drivers/android.cppindex d40fa66aed..6ab12dfe0e 100644--- a/src/input_common/drivers/android.cpp+++ b/src/input_common/drivers/android.cpp@@ -1,3 +1,6 @@+// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project+// SPDX-License-Identifier: GPL-3.0-or-later+// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project// SPDX-License-Identifier: GPL-3.0-or-later@@ -157,8 +160,8 @@ Common::ParamPackage Android::BuildButtonParamPackageForButton(PadIdentifier idebool Android::MatchVID(Common::UUID device, const std::vector<std::string>& vids) const {for (size_t i = 0; i < vids.size(); ++i) {- auto fucker = device.RawString();- if (fucker.find(vids[i]) != std::string::npos) {+ auto dev_str = device.RawString();+ if (dev_str.find(vids[i]) != std::string::npos) {return true;}}diff --git a/src/video_core/engines/maxwell_3d.h b/src/video_core/engines/maxwell_3d.hindex dd16438d55..f09cf24ed3 100644--- a/src/video_core/engines/maxwell_3d.h+++ b/src/video_core/engines/maxwell_3d.h@@ -2257,7 +2257,7 @@ public:/// Returns whether the vertex array specified by index is supposed to be/// accessed per instance or not.bool IsInstancingEnabled(std::size_t index) const {- return bool(is_instanced[index]); //FUCK YOU MSVC+ return bool(is_instanced[index]);}};diff --git a/src/video_core/engines/nv01_timer.h b/src/video_core/engines/nv01_timer.hindex 37c6668144..9e7d1a1acf 100644--- a/src/video_core/engines/nv01_timer.h+++ b/src/video_core/engines/nv01_timer.h@@ -40,7 +40,6 @@ public:}struct Regs {- // No fucking ideaINSERT_PADDING_BYTES_NOINIT(0x48);} regs{};private:diff --git a/src/video_core/host1x/vic.cpp b/src/video_core/host1x/vic.cppindex 024e483051..1a89f3de06 100644--- a/src/video_core/host1x/vic.cpp+++ b/src/video_core/host1x/vic.cpp@@ -963,7 +963,7 @@ void Vic::WriteABGR(const OutputSurfaceConfig& output_surface_config, VideoPixelauto pixel1213 = _mm_load_si128((__m128i*)&inp[src + x + 12]);auto pixel1415 = _mm_load_si128((__m128i*)&inp[src + x + 14]);- // Right-shift the channels by 16 to un-do the left shit on read and bring the range+ // Right-shift the channels by 16 to un-do the left shift on read and bring the range// back to 8-bit.pixel01 = _mm_srli_epi16(pixel01, 2);pixel23 = _mm_srli_epi16(pixel23, 2);diff --git a/src/video_core/macro.cpp b/src/video_core/macro.cppindex 3d7ac04851..86f528af15 100644--- a/src/video_core/macro.cpp+++ b/src/video_core/macro.cpp@@ -441,7 +441,7 @@ void MacroInterpreterImpl::Reset() {pc = 0;delayed_pc = {};method_address.raw = 0;- // Vector must hold its last indices otherwise wonky shit will happen+ // Vector must hold its last indices otherwise chaos will ensue// The next parameter index starts at 1, because $r1 already has the value of the first// parameter.next_parameter_index = 1;diff --git a/src/video_core/renderer_opengl/gl_device.cpp b/src/video_core/renderer_opengl/gl_device.cppindex 924ba2bbed..bc5803dae8 100644--- a/src/video_core/renderer_opengl/gl_device.cpp+++ b/src/video_core/renderer_opengl/gl_device.cpp@@ -59,7 +59,7 @@ std::vector<std::string> GetExtensions() {std::vector<std::string> extensions;for (GLint index = 0; index < num_extensions; ++index) {auto const* p = reinterpret_cast<const char*>(glGetStringi(GL_EXTENSIONS, GLuint(index)));- if (p != nullptr) // Fuck you? - sincerely, buggy mesa drivers+ if (p != nullptr)extensions.push_back(std::string{p});}return extensions;diff --git a/src/yuzu/main_window.cpp b/src/yuzu/main_window.cppindex 9b6b0a8b6a..f18a989255 100644--- a/src/yuzu/main_window.cpp+++ b/src/yuzu/main_window.cpp@@ -1,7 +1,8 @@// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project// SPDX-License-Identifier: GPL-3.0-or-later-// Qt on macOS doesn't define VMA shit+// Static Qt on macOS doesn't use Vulkan+// Other platforms do, and thus have conflicting VulkanMemoryAllocator symbols#if defined(QT_STATICPLUGIN) && !defined(__APPLE__)#undef VMA_IMPLEMENTATION#endifdiff --git a/src/yuzu/migration_worker.cpp b/src/yuzu/migration_worker.cppindex ba5e50e187..214356772f 100644--- a/src/yuzu/migration_worker.cpp+++ b/src/yuzu/migration_worker.cpp@@ -38,7 +38,7 @@ void MigrationWorker::process() {try {fs::remove_all(eden_dir);} catch (fs::filesystem_error& _) {- // ignore because linux does stupid crap sometimes+ // directory may not exist at this point, that's fine}switch (strategy) {