Commit Graph

134 Commits

Author SHA1 Message Date
gibbed
a7d4d6ee70 [Kernel] Use structures in XmpApp. 2020-04-13 12:57:14 -05:00
gibbed
ae7555e9ff [Kernel] Rename UnknownFEApp to XamApp. 2020-04-13 12:57:14 -05:00
gibbed
e03368c37e [XAM] Fix args of XamUser*ProfileSettings(Ex).
- Update arguments of XamUserReadProfileSettings/
  XamUserReadProfileSettingsEx.
- Fix arguments of XamUserWriteProfileSettings.
2020-04-13 12:57:14 -05:00
gibbed
3c8493dea2 [XAM] Clean up user index handling & stub.
- Clean up user index handling in XamUserGetXUID,
  XamUserGetSigninState, XamUserReadProfileSettings,
  XamUserWriteProfileSettings, XamUserCheckPrivilege,
  XamUserContentRestrictionGetFlags, XamUserAreUsersFriends.
  A user index of 0xFF does not mean anything special and is outright
  invalid.
- Move XamUserReadProfileSettings code to new
  xeXamUserReadProfileSettingsEx.
- Implement XamUserReadProfileSettings/XamUserReadProfileSettingsEx
  which now call xeXamUserReadProfileSettingsEx.
- Reorganized xeXamUserReadProfileSettingsEx so that the needed buffer
  size is checked before user index is validated, so that calls to
  determine necessary buffer size return correctly instead of an error
  about invalid user index.
- Stub XamUserIsOnlineEnabled.
2020-04-13 12:57:14 -05:00
gibbed
e99916b352 [Kernel] Clean up XAM registration function declarations. 2020-04-13 12:57:14 -05:00
Gliniak
a87c3785ee Template for 0xFE message: 0x21012
FYI: This message don't have length
2020-04-13 10:39:29 -05:00
Rados??aw Gli??ski
64dbd9936e "Template" for 0xFE message: 0x22005 2020-04-13 10:39:29 -05:00
Sandy Carter
df65de231f filesystem: use std for DeleteFolder
Remove custom platform implementation of `DeleteFolder` and replace two
uses with `std::filesystem::remove_all` which removes a file or
directory with all its contents.
2020-04-09 09:44:48 -05:00
Sandy Carter
69bcf59c79 filesystem: use std for CreateFolder
Remove custom platform implementation of `CreateFolder` and replace uses
with `std::filesystem::create_directories` which creates paths
recursively.
2020-04-09 09:44:48 -05:00
Sandy Carter
c8e64da4eb filesystem: use std for PathExists
Remove custom platform implementation of `PathExists` and replace uses
with `std::filesystem::exists`.
2020-04-09 09:44:48 -05:00
gibbed
c51cba080b Fix some bad string formats. 2020-04-08 13:05:37 -05:00
gibbed
a48bb71c2f Overhaul logging. 2020-04-07 16:09:41 -05:00
gibbed
5bf0b34445 C++17ification.
C++17ification!

- Filesystem interaction now uses std::filesystem::path.
- Usage of const char*, std::string have been changed to
  std::string_view where appropriate.
- Usage of printf-style functions changed to use fmt.
2020-04-07 16:09:41 -05:00
Triang3l
821a9897ef [Kernel/XAM] Even more detailed rationale for XNotifyGetNext param_ptr null check 2020-03-23 10:46:51 +03:00
Triang3l
61bcd467a6 [Kernel/XAM] Rationale for XNotifyGetNext param_ptr null check 2020-03-23 10:38:45 +03:00
Gliniak
4f8cdd9967 [Kernel/XAM] XNotifyGetNext: Check for nullptr for param_ptr 2020-03-22 15:38:31 -05:00
Gliniak
5558c8aafe [XAM/Network] Implemented NetDll___WSAFDIsSet 2020-03-03 17:07:49 -06:00
gibbed
8d5d70c77f [XAM] Don't allow an empty title.
[XAM] Don't allow an empty titles because ImGui explodes otherwise.
2020-02-29 15:47:19 -06:00
gibbed
c19a052b96 [XAM] Don't use strncpy for XamUserGetName. 2019-09-12 03:41:02 -05:00
gibbed
2780e7b1a6 Add user_country cvar, rename game_language cvar.
- [Kernel] Rename game_language cvar to user_language.
- [Kernel] Recategorize user_language to XConfig.
- [Kernel] Add user_country cvar, used instead of hardcoded value in XConfig.
- [XAM] Use user_country cvar for xeXamGetLocaleEx instead of
  xeExGetXConfigSetting.
2019-09-04 23:02:55 -05:00
gibbed
d58544b406 [XAM] Fix incomplete locale tables. 2019-09-04 23:02:55 -05:00
gibbed
858923898f [XAM] Implement a number of language/locale related functions.
[XAM] Implement XamGetLocale, XamGetOnlineCountryFromLocale,
  XamGetOnlineCountryString, XamGetCountryString, XamGetLanguageString,
  XamGetLanguageLocaleString, XamGetOnlineLanguageAndCountryString,
  XamGetLocaleString, XamGetLocaleFromOnlineCountry,
  XamGetLanguageFromOnlineLanguage, XamGetOnlineLanguageString,
  XamGetCountryFromOnlineCountry, and XamGetLocaleEx.
2019-09-04 20:03:25 -05:00
emoose
b22d76f0f9 [Kernel] Add XLiveBase 0x58046 stub 2019-08-21 02:00:57 -05:00
gibbed
6ab7720951 [Kernel] Fix stray whitespace in license_mask definition. 2019-08-14 14:15:56 -05:00
illusion98
c021c7741d [Kernel] Add license mask as a config variable 2019-08-14 10:25:24 -05:00
emoose
313e81ec38 [Kernel] Add XN_SYS_UI notifications to XamShow*UI exports 2019-08-04 03:57:06 +01:00
Jonathan Goyvaerts
c1af632562 Replace all gflag implementations with cvar implementations 2019-08-03 02:34:07 +02:00
gibbed
0d6bfc1a6b [Kernel] Rename NotifyListener to XNotifyListener to bring it in line with the naming scheme of kernel objects. 2019-07-29 13:43:13 -05:00
gibbed
12629fe101 [Kernel] Change dummy HDD to 3GB free/4GB total. 2018-12-03 12:07:42 -06:00
gibbed
9dc46eee85 [Kernel] Null terminate string in XamContentGetDeviceName. 2018-12-03 12:00:56 -06:00
gibbed
947eef4701 [Kernel] Static size assert for X_CONTENT_DEVICE_DATA. 2018-12-03 11:54:47 -06:00
gibbed
aa38d4b77b [Kernel] Zero out device data in XamContentGetDeviceData. 2018-12-03 11:54:23 -06:00
gibbed
919882dd68 [Kernel] Fix use of wrong macro in XamEnumerate for extended error. 2018-11-29 12:34:56 -06:00
gibbed
527f960288 [Kernel] Proper size in XamUserCreateAchievementEnumerator. 2018-11-26 20:43:41 -06:00
gibbed
248b661d14 [Kernel] Maybe fix XamEnumerate, again?
Some titles, when using XamEnumerate synchronously, expect X_ERROR_NO_MORE_FILES as the return value.
Some titles, when using XamEnumerate asynchronously, expect X_ERROR_FUNCTION_FAILED as the overlapped result.
2018-11-26 19:53:03 -06:00
gibbed
28b494dadc [Kernel] Stub XMsg app 0x000000FE/msg 0x00020021. 2018-11-26 10:21:09 -06:00
gibbed
5b2b2a3cc1 [Kernel] Fix logging of app for XMsgInProcessCall/XMsgSystemProcessCall/XMsgStartIORequest/XMsgStartIORequestEx. 2018-11-26 09:04:10 -06:00
gibbed
03d6de997c [Kernel] Some titles seem to explicitly expect X_ERROR_FUNCTION_FAILED to mean no more files when enumerating content. 2018-11-26 07:33:21 -06:00
gibbed
64403d5dc6 [Kernel] Don't directly call RtlNtStatusToDosError export. 2018-11-25 09:58:03 -06:00
gibbed
216bec15f6 [Kernel] Stub XamQueryLiveHiveW. 2018-11-25 09:56:22 -06:00
gibbed
4dfe83af6c [Kernel] Fix threading issues caused by direct use of exports. 2018-11-25 05:08:16 -06:00
gibbed
e6dbd8905c [Kernel] Stub XLiveBaseGetNatType. 2018-11-25 03:46:44 -06:00
gibbed
20315850db [Kernel] Stub XamFeatureEnabled. 2018-11-24 20:53:45 -06:00
gibbed
c98f6af1d8 [Kernel] Better stub XAM online schema. 2018-11-24 17:47:24 -06:00
gibbed
213e688173 [Kernel] Fix some stuff from PR merge. 2018-11-23 17:27:35 -06:00
emoose
933588717e [Kernel] Add XamGetOnlineSchema export, returns dummy data 2018-11-23 16:38:34 -06:00
emoose
8c6e0b86f9 [Kernel] swprintf_s -> swprintf, change how Format*String/Build*ResourceLocator exports copy text
New way of copying the text should make it less likely for any buffer overflows to occur.
2018-11-23 16:38:34 -06:00
emoose
8efbe32867 [Kernel] Add XamBuild*ResourceLocator & XamFormat*String exports
Resource locators are just strings that say where to find a resource, they can either point to a file path or to an XEX resource.
Normally the Gamercard/SharedSystem exports use XamBuildResourceLocator to make a locator for the resources inside xam.xex.
But since our xam won't have those resources I've made it point them to a local file instead (by passing 0 as the module param for XamBuildResourceLocator).
The resources will have to be extracted to the XEX's local path for it to find them though (and XEX will need to have media:\ symlinked too)

The XamFormat*String exports are really windows-only right now, but they'll at least empty the buffer for other platforms.
They'll also always output MM/DD/YYYY no matter what locale the system is, on 360 this is localized properly of course.

I've renamed XamBuildSharedResourceLocator_ to XamBuildLegacySystemResourceLocator too since that seems to be the proper name for it.
In earlier Xams this just pointed to ...SharedSystemResourceLocator (as does this code), but later versions seem to have their own function.
2018-11-23 16:38:34 -06:00
emoose
c5056c644f [Kernel] Add XamNotifyCreateListenerInternal export (1 unknown param)
Just changed the existing XamNotifyCreateListener import to ...CreateListenerInternal, and made a new XamNotifyCreateListener that just calls the internal version.
2018-11-23 16:38:34 -06:00
emoose
5e9e226c94 [Kernel] Add XamContentCreateDeviceEnumerator export
Also changed name field of DeviceInfo to be a wchar_t* of known length, makes it match the X360 DeviceInfo struct more closely and it's easier to make sure things reading it won't overflow anything.
2018-11-23 16:37:04 -06:00