Commit graph

93 commits

Author SHA1 Message Date
Yuri Kunde Schlesner
c27dad4cd1 ResultVal: Remove MoveFrom()
Replace it with std::move(result_val).Unwrap(), or Foo().Unwrap() in
case you already have an rvalue.
2017-06-18 19:03:15 -07:00
Yuri Kunde Schlesner
f68fd997cd Service: Remove unnecessary includes from service.h
This has a huge fallout in terms of needing to fix other files because
all service implementations included that file.
2017-06-06 02:57:23 -07:00
Yuri Kunde Schlesner
8a35f3634e Kernel: Add a dedicated SetHleHandler method to ServerPort/ServerSession
This allows attaching a HLE handle to a ServerPort at any point after it
is created, allowing port/session creation to be generic between HLE and
regular services.
2017-06-06 02:56:32 -07:00
Yuri Kunde Schlesner
41a3feea66 HLE: Move SessionRequestHandler from Service:: to Kernel::
Most of the code that works with this is or will be in the kernel, so
it's a more appropriate place for it to be.
2017-06-05 23:40:11 -07:00
TheKoopaKingdom
e0f8f75f43 Addressed Bunnei's review comments, and made some other tweaks:
- Deleted GetStatus() because it wasn't used anywhere outside of Core::System.
 - Fixed design flaw where the message bar status could be set despite the game being stopped.
2017-06-02 18:40:39 -04:00
TheKoopaKingdom
fa11f957f4 Switched to the ERROR_NOT_FOUND constant from errors.h. 2017-06-02 18:40:39 -04:00
TheKoopaKingdom
cee9b78a15 Made some changes from review comments:
- Made LoadKernelSystemMode return a pair consisting of a system mode and a result code (Could use review).
- Deleted ErrorOpenGL error code in favor of just having ErrorVideoCore.
- Made dialog messages more clear.
- Compared archive ID in fs_user.cpp to ArchiveIdCode::NCCH as opposed to hex magic.
- Cleaned up some other stuff.
2017-06-02 18:28:14 -04:00
Yuri Kunde Schlesner
782c6b1923 FS: Remove unused result definition 2017-05-24 21:06:00 -07:00
Yuri Kunde Schlesner
2d147a1c0d FileSys: Move all result description to errors.h 2017-05-24 21:06:00 -07:00
bunnei
5d22844f3e core: Remove HLE module, consolidate code & various cleanups. 2016-12-21 23:48:13 -05:00
wwylele
267f26d7df FS: fix debug build from #2249 2016-12-16 00:22:36 +02:00
Yuri Kunde Schlesner
c99b5e3122 Merge pull request #2249 from Subv/sessions_v3
Kernel/IPC: Use Ports and Sessions as the fundamental building block of Inter Process Communication.
2016-12-14 20:35:33 -08:00
Subv
3e80a1a1c1 Fixed the codestyle to match our clang-format rules. 2016-12-14 12:45:36 -05:00
Subv
6df6ad46c4 Moved the HLE command buffer translation task to ServerSession instead of the HLE handler superclass. 2016-12-09 12:52:12 -05:00
Subv
17d8d69c6e Added a framework for partially handling Session disconnections.
Further implementation will happen in a future commit.

Fixes a regression.
2016-12-08 15:01:10 -05:00
Subv
708ece3fff Split SessionRequestHandler::HandleSyncRequest into HandleSyncRequest, TranslateRequest and HandleSyncRequestImpl.
HandleSyncRequest now takes care of calling the command buffer translate function before actually invoking the command handler for HLE services.
2016-12-05 12:05:00 -05:00
Subv
4c4f50dfaf Fixed the rebase mistakes. 2016-11-30 23:28:31 -05:00
Subv
4f2326c8a9 A bit of a redesign.
Sessions and Ports are now detached from each other.
HLE services are handled by means of a SessionRequestHandler class, Interface now inherits from this class.
The File and Directory classes are no longer kernel objects, but SessionRequestHandlers instead, bound to a ServerSession when requested.
File::OpenLinkFile now creates a new session pair and binds the File instance to it.
2016-11-30 23:12:35 -05:00
Subv
302ef594a6 Kernel/IPC: Use Ports and Sessions as the fundamental building block of Inter Process Communication.
All handles obtained via srv::GetServiceHandle or svcConnectToPort are references to ClientSessions.
Service modules will wait on the counterpart of those ClientSessions (Called ServerSessions) using svcReplyAndReceive or svcWaitSynchronization[1|N], and will be awoken when a SyncRequest is performed.

HLE Interfaces are now ClientPorts which override the HandleSyncRequest virtual member function to perform command handling immediately.
2016-11-30 23:02:05 -05:00
wwylele
1e4a1598fd FileSys: Implement OtherSaveData 2016-11-29 23:50:00 +02:00
wwylele
37e9404489 FileSys: abstract SD save data archive source 2016-11-29 23:50:00 +02:00
wwylele
01964d37fb FileSys: rename SaveDataCheck archive to NCCH archive
According to the observation from game and 3dbrew "Used for accessing general NCCH data"
2016-11-19 18:55:35 +02:00
wwylele
a14bab3b8b FileSys: add SDMCWriteOnlyArchive 2016-11-19 18:55:34 +02:00
wwylele
657bb716f7 FileSys: make Archive interfaces return error code
and make the mode parameter a reference since it is a BitField union
2016-11-01 18:30:32 +02:00
wwylele
b2fa64ec75 fs: implement DeleteDirectoryRecursively 2016-10-02 11:29:16 +08:00
Yuri Kunde Schlesner
fa5d9d8266 Use negative priorities to avoid special-casing the self-include 2016-09-21 00:15:56 -07:00
Emmanuel Gil Peyrot
1138ec0d49 Remove empty newlines in #include blocks.
This makes clang-format useful on those.

Also add a bunch of forgotten transitive includes, which otherwise
prevented compilation.
2016-09-21 11:15:47 +09:00
Yuri Kunde Schlesner
1e4a5da9f4 Manually tweak source formatting and then re-run clang-format 2016-09-18 21:14:25 -07:00
Emmanuel Gil Peyrot
628ed4376a Sources: Run clang-format on everything. 2016-09-18 09:38:01 +09:00
Yuri Kunde Schlesner
7b50bcee79 Merge pull request #1894 from wwylele/set-config-block
Implement config savegame editing & clean up
2016-07-09 20:39:19 -07:00
JamePeng
c7d5fee7fb Fix the errorcode of archive handle 2016-07-05 00:39:09 +08:00
wwylele
5489701b38 Service::CFG/FS: add and refactor out utilities for front-end 2016-07-03 08:23:59 +03:00
Subv
b502c2e4d0 Memory: Handle RasterizerCachedMemory and RasterizerCachedSpecial page types in the memory block manipulation functions. 2016-05-28 13:52:50 -05:00
MerryMage
dfe7263cd4 FS/Archive: Remove use of Memory::GetPointer 2016-05-28 13:44:44 -05:00
tfarley
459035a108 HWRasterizer: Texture forwarding 2016-04-21 17:27:56 -04:00
MerryMage
9f9c987924 Common: Remove Common::make_unique, use std::make_unique 2016-04-05 13:31:17 +01:00
Subv
b94133bd71 HLE/FS: Change the error code returned when an ExtSaveData archive is not found.
This allows Fire Emblem to boot again.
2016-03-20 14:52:50 -05:00
Subv
438f0cb335 HLE/FS: Corrected some style concerns. 2016-03-20 14:52:26 -05:00
Subv
9773d90363 HLE/FS: Implemented GetFormatInfo
Format information is currently only implemented for the ExtSaveData, SharedExtSaveData and SaveData archives, the information is stored in a file alongside the root folder of the archive.
2016-03-20 14:30:01 -05:00
Subv
90d5e8b597 HLE/FS: Don't return an error when deleting the ExtSaveData if it does not exist. 2016-03-20 14:28:24 -05:00
Subv
6983167205 HLE/FS: Return the proper error codes when opening files. 2016-03-20 14:28:22 -05:00
Subv
a871f0b7d0 HLE/FS: Fixed the OpenDirectory error code 2016-03-20 14:28:19 -05:00
Subv
bbbdb660af HLE/FS: Return the proper error codes on file Read/Write operations.
These operations are limited by the open flags specified while opening the file.
2016-03-20 14:28:17 -05:00
Subv
e248331abc HLE/FS: Corrected the error codes for DeleteFile 2016-03-20 14:28:14 -05:00
Subv
3c9508c468 HLE/FS: FS::CreateFile takes an u64 for the file size. 2016-03-20 14:28:08 -05:00
archshift
5da25ae7d0 Implement FS_User::GetFreeBytes 2015-10-27 23:33:59 -07:00
Yuri Kunde Schlesner
a1f08788d9 Archive: Correct a few incorrect types in function signatures
Buffer lengths should be size_t, and file offsets should be u64.
2015-07-13 21:10:12 -03:00
Emmanuel Gil Peyrot
e5fcabdd69 Core: Cleanup file_sys includes. 2015-06-28 00:36:54 +01:00
Subv
66c1db7288 ExtSavedata: Save the icon passed to CreateExtSaveData to the correct folder.
Organize the ExtSaveData folders as they are stored in the console.
2015-06-01 21:48:19 -05:00
Emmanuel Gil Peyrot
b1503b2020 Remove every trailing whitespace from the project (but externals). 2015-05-29 21:59:29 +01:00