summaryrefslogtreecommitdiff
path: root/src/core (follow)
Commit message (Collapse)AuthorAgeFilesLines
* network: add missing include for BSDsGravatar Jan Beich2020-07-221-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | src/core/network/network.cpp:112:28: error: use of undeclared identifier 'SHUT_RD' constexpr int SD_RECEIVE = SHUT_RD; ^ src/core/network/network.cpp:113:25: error: use of undeclared identifier 'SHUT_WR' constexpr int SD_SEND = SHUT_WR; ^ src/core/network/network.cpp:114:25: error: use of undeclared identifier 'SHUT_RDWR' constexpr int SD_BOTH = SHUT_RDWR; ^ src/core/network/network.cpp:120:37: error: unknown type name 'in_addr'; did you mean 'in_addr_t'? constexpr IPv4Address TranslateIPv4(in_addr addr) { ^~~~~~~ in_addr_t /usr/include/netdb.h:66:20: note: 'in_addr_t' declared here typedef __uint32_t in_addr_t; ^ src/core/network/network.cpp:121:27: error: member reference base type 'in_addr_t' (aka 'unsigned int') is not a structure or union const u32 bytes = addr.s_addr; ~~~~^~~~~~~ src/core/network/network.cpp:121:15: error: variables defined in a constexpr function must be initialized const u32 bytes = addr.s_addr; ^ src/core/network/network.cpp:126:10: error: incomplete result type 'sockaddr' in function definition sockaddr TranslateFromSockAddrIn(SockAddrIn input) { ^ /usr/include/netdb.h:142:9: note: forward declaration of 'sockaddr' struct sockaddr *ai_addr; /* binary address */ ^ src/core/network/network.cpp:127:5: error: unknown type name 'sockaddr_in'; did you mean 'sockaddr'? sockaddr_in result; ^~~~~~~~~~~ sockaddr /usr/include/netdb.h:142:9: note: 'sockaddr' declared here struct sockaddr *ai_addr; /* binary address */ ^ src/core/network/network.cpp:127:17: error: variable has incomplete type 'sockaddr' sockaddr_in result; ^ /usr/include/netdb.h:142:9: note: forward declaration of 'sockaddr' struct sockaddr *ai_addr; /* binary address */ ^ src/core/network/network.cpp:131:29: error: use of undeclared identifier 'AF_INET' result.sin_family = AF_INET; ^ src/core/network/network.cpp:135:29: error: use of undeclared identifier 'AF_INET' result.sin_family = AF_INET; ^ src/core/network/network.cpp:139:23: error: use of undeclared identifier 'htons' result.sin_port = htons(input.portno); ^ src/core/network/network.cpp:143:14: error: variable has incomplete type 'sockaddr' sockaddr addr; ^ /usr/include/netdb.h:142:9: note: forward declaration of 'sockaddr' struct sockaddr *ai_addr; /* binary address */ ^ src/core/network/network.cpp:156:1: error: unknown type name 'linger' linger MakeLinger(bool enable, u32 linger_value) { ^ src/core/network/network.cpp:157:5: error: unknown type name 'linger' linger value; ^ src/core/network/network.cpp:185:16: error: use of undeclared identifier 'AF_INET' return AF_INET; ^ src/core/network/network.cpp:195:16: error: use of undeclared identifier 'SOCK_STREAM' return SOCK_STREAM; ^ src/core/network/network.cpp:197:16: error: use of undeclared identifier 'SOCK_DGRAM' return SOCK_DGRAM; ^ src/core/network/network.cpp:207:16: error: use of undeclared identifier 'IPPROTO_TCP' return IPPROTO_TCP; ^ fatal error: too many errors emitted, stopping now [-ferror-limit=]
* Merge pull request #4306 from ReinUsesLisp/bsd-networkGravatar David2020-07-215-0/+840
|\ | | | | core/network: Add network abstraction
| * core/network: Add network abstractionGravatar ReinUsesLisp2020-07-195-0/+840
| | | | | | | | | | | | | | | | | | | | This commit adds a network abstraction designed to implement bsd:s but at the same time work as a generic abstraction to implement any networking code we have to use from core. This is implemented on top of BSD sockets on Unix systems and winsock on Windows. The code is designed around winsocks having compatibility definitions to support both BSD and Windows sockets.
* | Merge pull request #4348 from lioncash/nanoGravatar bunnei2020-07-1813-71/+80
|\ \ | | | | | | core_timing: Make usage of nanoseconds more consistent in the interface
| * | core_timing: Remove unused data memberGravatar Lioncash2020-07-151-2/+0
| | | | | | | | | | | | Shrinks the size of the CoreTiming class by 8 bytes.
| * | core_timing: Make TimedCallback take std::chrono::nanosecondsGravatar Lioncash2020-07-1513-44/+45
| | | | | | | | | | | | Enforces our desired time units directly with a concrete type.
| * | core_timing: Make use of std::chrono with ScheduleEventGravatar Lioncash2020-07-1510-32/+42
| | |
* | | Merge pull request #4345 from Morph1984/fix-createfileGravatar bunnei2020-07-181-0/+4
|\ \ \ | | | | | | | | filesystem: Create subdirectories prior to creating a file
| * | | Add comment to clarify the nullptr checkGravatar Morph2020-07-161-0/+1
| | | |
| * | | filesystem: Create subdirectories prior to creating a fileGravatar Morph2020-07-161-0/+3
| | | | | | | | | | | | | | | | | | | | If subdirectories exist in the given path parameter and don't exist in the real filesystem create them prior to creating the files within. This fixes the softlocks upon save creation in The Legend of Zelda: Breath of the Wild
* | | | Merge pull request #4273 from ogniK5377/async-shaders-prodGravatar bunnei2020-07-183-0/+5
|\ \ \ \ | | | | | | | | | | video_core: Add asynchronous shader decompilation and compilation
| * | | | Drop settings namespaceGravatar David Marcec2020-07-171-2/+1
| | | | |
| * | | | Rebase for per game settingsGravatar David Marcec2020-07-173-0/+6
| | |_|/ | |/| |
* | | | Merge pull request #4365 from lioncash/miiGravatar bunnei2020-07-171-53/+54
|\ \ \ \ | | | | | | | | | | mii/manager: Make use of designated initializers
| * | | | mii/manager: Make use of designated initializersGravatar Lioncash2020-07-161-53/+54
| | | | | | | | | | | | | | | | | | | | Allows returning the structure in a more concise manner.
* | | | | Merge pull request #4366 from lioncash/mii-signGravatar bunnei2020-07-171-3/+3
|\ \ \ \ \ | | | | | | | | | | | | mii/manager: Resolve sign mismatch warnings
| * | | | | mii/manager: Resolve sign mismatch warningsGravatar Lioncash2020-07-161-3/+3
| |/ / / / | | | | | | | | | | | | | | | | | | | | Previously the loop termination condition was testing variables of different signedness.
* | | | | Merge pull request #4344 from VolcaEM/c3Gravatar bunnei2020-07-172-1/+42
|\ \ \ \ \ | | | | | | | | | | | | dmnt_cheat_vm: Implement opcode 0xC3 (ReadWriteStaticRegister)
| * | | | | clang-formatGravatar VolcaEM2020-07-151-1/+2
| | | | | |
| * | | | | dmnt_cheat_vm: Implement opcode 0xC3 (ReadWriteStaticRegister)Gravatar VolcaEM2020-07-152-1/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was based on Atmosphére's DMNT Cheat VM: - https://github.com/Atmosphere-NX/Atmosphere/blob/master/stratosphere/dmnt/source/cheat/impl/dmnt_cheat_vm.hpp - https://github.com/Atmosphere-NX/Atmosphere/blob/master/stratosphere/dmnt/source/cheat/impl/dmnt_cheat_vm.cpp From Atmosphére's documentation: "Code type 0xC3 reads or writes a static register with a given register" There are now only two remaining opcodes to implement (PauseProcess and BreakProcess) This is untested because I don't have any experience in testing cheats on yuzu
* | | | | | Merge pull request #4309 from Morph1984/fix-romfs-bugGravatar bunnei2020-07-174-10/+10
|\ \ \ \ \ \ | |_|_|/ / / |/| | | | | fs: Fix RomFS building when zero byte files are present
| * | | | | fs: Fix RomFS building when zero byte files are presentGravatar Morph2020-07-124-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When zero byte files are present, the key (offset) for that file is identical to the file right after. A std::map isn't able to fit key-value pairs with identical keys (offsets), therefore, the solution is to use std::multimap which permits multiple entries with the same key. This most prominently fixes Pokemon Sword and Shield weather with any RomFS mod applied.
* | | | | | Merge pull request #4347 from lioncash/loggingGravatar David2020-07-171-38/+39
|\ \ \ \ \ \ | | | | | | | | | | | | | | settings: Make use of std::string_view over std::string for logging
| * | | | | | settings: Resolve a sign conversion warning within GetTimeZoneString()Gravatar Lioncash2020-07-151-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A sign conversion warning was occurring due to an int < size_t comparison.
| * | | | | | settings: Make use of std::string_view over std::string for loggingGravatar Lioncash2020-07-151-33/+34
| | |_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In all usages of LogSetting(), string literals are provided. std::string_view is better suited here, as we won't churn a bunch of string allocations every time the settings are logged out. While we're at it, we can fold LogSetting() into LogSettings(), given it's only ever used there.
* | | | | | Merge pull request #4371 from lioncash/cmake2Gravatar David2020-07-171-0/+1
|\ \ \ \ \ \ | | | | | | | | | | | | | | core/CMakeLists: Add missing physical_memory.h header file
| * | | | | | core/CMakeLists: Add missing physical_memory.h header fileGravatar Lioncash2020-07-161-0/+1
| | |_|_|/ / | |/| | | | | | | | | | | | | | | | Allows this header file to show up in IDE CMake generators.
* | | | | | Merge pull request #4357 from lioncash/unused4Gravatar David2020-07-173-7/+2
|\ \ \ \ \ \ | | | | | | | | | | | | | | kernel: Remove unused variables
| * | | | | | kernel: Remove unused variablesGravatar Lioncash2020-07-163-7/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Resolves some compiler warnings in the Linux build.
* | | | | | | Merge pull request #4358 from lioncash/unused5Gravatar David2020-07-171-2/+0
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | kernel/thread: Remove unimplemented function prototype
| * | | | | | | kernel/thread: Remove unimplemented function prototypeGravatar Lioncash2020-07-161-2/+0
| |/ / / / / / | | | | | | | | | | | | | | | | | | | | | This isn't used, so it can be removed.
* | / / / / / constants: Add missing <array> includeGravatar Lioncash2020-07-161-0/+1
| |/ / / / / |/| | | | | | | | | | | | | | | | | Eliminates reliance on an indirect include.
* | | | | | Merge pull request #4292 from bunnei/mii-rewriteGravatar bunnei2020-07-169-914/+3270
|\ \ \ \ \ \ | | | | | | | | | | | | | | hle: service: mii: Rewrite service to properly support creation of random and default miis.
| * | | | | | hle: service: mii: Rewrite service to properly support creation of random ↵Gravatar bunnei2020-07-119-914/+3270
| | | | | | | | | | | | | | | | | | | | | | | | | | | | and default miis.
* | | | | | | Merge pull request #4327 from lioncash/desig2Gravatar Rodrigo Locatti2020-07-162-58/+38
|\ \ \ \ \ \ \ | |_|/ / / / / |/| | | | | | address_space_info: Make use of designated initializers
| * | | | | | address_space_info: Use type alias to simplify codeGravatar Lioncash2020-07-131-14/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We can define an alias for the index arrays and then just reuse it to make the code nicer to read.
| * | | | | | address_space_info: Make use of designated initializersGravatar Lioncash2020-07-132-46/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We can alter the structure so that we can use designated initializers in the array, eliminating the comments that indicate their field names.
* | | | | | | kernel: Add missing includeGravatar Lioncash2020-07-161-0/+1
| | | | | | |
* | | | | | | cpu_manager: Mark function getters as staticGravatar Lioncash2020-07-164-10/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All these do are return std::function instances of static functions, so these can be used without an instance of the CPU manager.
* | | | | | | cpu_manager: Remove unused preemption_count variableGravatar Lioncash2020-07-161-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Shrinks the data structure by 8 bytes.
* | | | | | | cpu_manager: Add missing includesGravatar Lioncash2020-07-161-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously this header was relying on indirect inclusions that are no longer satisfied.
* | | | | | | Merge pull request #4337 from lat9nq/fix-per-game-asyncGravatar bunnei2020-07-162-0/+8
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | main: Set async gpu properly after loading per-game setting
| * | | | | | | clang-formatGravatar lat9nq2020-07-141-2/+1
| | | | | | | |
| * | | | | | | settings: Move settings sanitization to its own functionGravatar lat9nq2020-07-142-0/+9
| |/ / / / / / | | | | | | | | | | | | | | | | | | | | | Creates a new function that can be expanded later to fix other settings that are known to cause emulation errors across executables.
* | | | | | | Merge pull request #4346 from lioncash/threadGravatar David2020-07-167-35/+26
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | kernel/handle_table: Remove usages of the global system instance
| * | | | | | | kernel/process: Move name and system context to the bottom of the member listGravatar Lioncash2020-07-151-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These aren't directly important or commonly used within the process, so we can move these to the bottom to allow everything else to be more likely to be within a cache line.
| * | | | | | | kernel/handle_table: Remove usages of the global system instanceGravatar Lioncash2020-07-154-8/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Removes even more usages of the global system instance, trimming away more dependencies on global variables and making them explicit in the interface.
| * | | | | | | kernel/thread: Remove global GetCurrentThread()Gravatar Lioncash2020-07-153-23/+7
| | |_|/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | This is only used in one place, so we can fold it into the calling code, eliminating a place for the global system instance to be used.
* | | | | | | Merge pull request #4249 from Morph1984/delete-update-aoc-on-overwriteGravatar David2020-07-162-10/+92
|\ \ \ \ \ \ \ | |_|_|_|_|_|/ |/| | | | | | registered_cache: Remove previous update/dlc if it exists on install
| * | | | | | Check for empty section0 and CNMT prior to installGravatar Morph2020-07-161-3/+19
| | | | | | |