Commit graph

76 commits

Author SHA1 Message Date
GPUCode cf9bb90ae3
code: Use std::span where appropriate (#6658)
* code: Use std::span when possible

* code: Prefix memcpy and memcmp with std::
2023-07-07 01:52:40 +03:00
GPUCode 7edc86a9bc
code: Remove outdated comment style (#6640) 2023-06-25 15:22:41 +05:30
Vitor K 34de77d429
Various miscelaneous changes (#6496) 2023-05-03 17:24:10 +02:00
Steveice10 d9d0fc63ec
applet: Fix HLE applet pre-start lifecycle. (#6362) 2023-03-25 22:36:14 +01:00
Steveice10 c96f54f022
Implement app management support (suspend, resume, close, etc) (#6322) 2023-03-10 00:44:26 +01:00
Steveice10 3c15398f9e
apt: Implement additional applet state management. (#6303)
* apt: Implement additional library applet state management.

* kernel: Clear process handle table on exit.

* apt: Implement system applet commands.

* apt: Pop MediaType from command buffers with correct size.

* apt: Improve accuracy of parameters and HLE applet lifecycle.

* apt: General cleanup.

* file_sys: Make system save data open error code more correct.

Not sure if this is the exact right error code, but it's at least
more correct than before as Game Notes will now create its system
save data instead of throwing a fatal error.

* apt: Fix launching New 3DS Internet Browser.

* frd: Correct fix to GetMyScreenName response.
2023-02-28 14:09:54 +02:00
FearlessTobi da908a9ed1 core: Remove unnecessary enum casts in log calls
Follows the video core PR. fmt doesn't require casts for enum classes
anymore, so we can remove quite a few casts.

Co-Authored-By: LC <712067+lioncash@users.noreply.github.com>
2020-12-29 06:39:21 +01:00
zhupengfei 190a053987
applets/swkbd: Properly handle button_text
I'm not sure why we decided to have a boolean here, but apparently that wasn't the correct behaviour. According to HW tests, the Software Keyboard simply displays the default text when the button text provided is empty (**not necessarily all zero**). For example, if you set a text for one of the buttons and leave others empty, the button you set will have your text, while others will have their default texts. Removed the boolean and updated frontend code to make it correct.
2020-05-31 09:41:30 +08:00
zhupengfei 17ba846a3f
applets/swkbd: Remove text memory clearing
The text shared memory wasn't supposed to be cleared according to my comparison with the LLE swkbd. This can cause issues in certain games such as Harvest Moon.

A null terminator is added to the text copied to mark the end of the string.
2019-12-01 23:01:07 +08:00
zhupengfei d7fbc1ca2c
common/string_util: Move TextFromBuffer to string_util 2019-04-08 22:34:21 +08:00
zhupengfei 25be09c7a3
applets/swkbd: Address comments 2019-04-08 21:45:32 +08:00
zhupengfei 8078256a88 applets/swkbd: Add callback support 2019-04-08 21:45:29 +08:00
fearlessTobi e9bd34f7da Address remaining review comments 2019-04-07 17:00:28 +02:00
fearlessTobi 1517d2fef7 Address more reviews 2019-04-07 15:35:32 +02:00
fearlessTobi 781d4b787a Address first batch of review comments 2019-04-07 15:35:32 +02:00
fearlessTobi 041638ea4d applets: implement HLE mii selector applet 2019-04-07 15:35:29 +02:00
Weiyi Wang 05058863b5 cleanup includes 2019-03-26 10:50:41 -04:00
Weiyi Wang 5f11c5f733 Kernel: replace boost::intrusive_ptr with std::shared_ptr 2019-03-24 14:32:11 -04:00
tgsm 39e163b7ce core: use nested namespaces 2019-02-18 20:34:18 -05:00
Weiyi Wang 76944ec0e0
Merge pull request #4279 from FearlessTobi/better-mii-stub
applets: stub mii selector to always return a standard mii
2018-12-01 19:41:21 -05:00
fearlessTobi 48239be22c mii_selector: Use BitField where possible 2018-11-27 14:57:51 +01:00
fearlessTobi fe99e5a51e mii_selector: map raw data to the MiiResult struct 2018-11-24 14:35:06 +01:00
Lioncash 1cb9bea504 kernel/shared_memory: Make data members private
Rather than allow unfettered access to the class internals, we hide all
members by default and create and API that other code can operate
against.
2018-11-23 16:20:18 +01:00
Weiyi Wang d90094e8a7 Service: release shared memory object when finalize
Since last commit SharedMemory only reset source memory set on dtor, service should always release the ref as soon as possible to make the reset happen
2018-11-16 00:24:13 -05:00
Weiyi Wang 1444d60109
Merge pull request #4400 from wwylele/core-timing-global
CoreTiming: wrap into class
2018-11-06 20:04:56 -05:00
Weiyi Wang 2067946f59
Kernel: reimplement memory management on physical FCRAM (#4392)
* Kernel: reimplement memory management on physical FCRAM

* Kernel/Process: Unmap does not care the source memory permission

What game usually does is after mapping the memory, they reprotect the source memory as no permission to avoid modification there

* Kernel/SharedMemory: zero initialize new-allocated memory

* Process/Thread: zero new TLS entry

* Kernel: fix a bug where code segments memory usage are accumulated twice

It is added to both misc and heap (done inside HeapAlloc), which results a doubled number reported by svcGetProcessInfo. While we are on it, we just merge the three number misc, heap and linear heap usage together, as there is no where they are distinguished.

Question: is TLS page also added to this number?

* Kernel/SharedMemory: add more object info on mapping error

* Process: lower log level; SharedMemory: store phys offset

* VMManager: add helper function to retrieve backing block list for a range
2018-11-06 15:00:47 -05:00
Weiyi Wang 9458e4d8ec CoreTiming: wrap into class 2018-11-04 10:26:38 -05:00
fearlessTobi 6e6c437a52 applets: stub mii selector to always return a standard mii
To obtain the data, the LLEd mii selector of system version 11.8.0 was used.
In AppletManager::GlanceParameter, the following code was added to write the returned buffer data to a file:

    if (parameter.buffer.size() == 132) {
        std::u16string name(10, '\0');
        std::memcpy(name.data(), parameter.buffer.data() + 0x26, 10 * sizeof(u16));
        name = std::u16string(name.data());
        FileUtil::IOFile file{fmt::format("{}.mii", Common::UTF16ToUTF8(name)), "wb"};
        file.WriteBytes(parameter.buffer.data(), parameter.buffer.size());
    }

Then "xxd -i" was used on the file to convert it to a hex array.
2018-10-27 12:23:24 +02:00
Weiyi Wang 87426b29ff kernel: pass ref to shared memory 2018-10-18 21:41:36 -04:00
Weiyi Wang 18e94897c4 hle/swkbd: specify endianness for enum and other members 2018-09-22 00:28:44 -04:00
Weiyi Wang 7d8f115185 Prefix all size_t with std::
done automatically by executing regex replace `([^:0-9a-zA-Z_])size_t([^0-9a-zA-Z_])` -> `$1std::size_t$2`
2018-09-06 16:03:28 -04:00
BreadFish64 74cd98ecad core: clean up warnings 2018-08-01 14:10:23 -05:00
Alexandre LittleWhite Laurent 578b08c53b Truncating UTF16 text before converting them toUTF8 2018-07-21 18:17:46 +02:00
zhupengfei 5407ed8b5e
citra_qt/applets/swkbd: QtKeyboard and misc fixes
* Addressed comments and removed the applet interface

* swkbd: address @lioncash's comments

* core: more fixes

** Moved registered_swkbd to System

** Removed an usused virtual

** Removed functionality of DrawScreenKeyboard

** Removed src/core/settings.h change

* swkbd: address @lioncash's 2nd review

* swkbd: update logging macro

* QtKeyboard: Make dialog modal and hide help
2018-07-10 12:49:55 +08:00
zhupengfei f23443b921
applets/swkbd: Implement DefaultCitraKeyboard 2018-06-30 08:01:50 +08:00
zhupengfei 18664c719e
frontend/applets: misc fixes
* Renamed applet to applets

* Added log classes Applet and Applet.SWKBD

* Fixes to get it compile
2018-06-30 08:01:49 +08:00
James Rowe caacefcc2e
frontend/applets: frontend swkbd base
Original commits by @jroweboy:

* Rebase out the other commit

* changing branches

* More work on stuff and things ecks DEE

Changes by @zhaowenlan1779:

* Removed #include of result.h
2018-06-30 08:01:31 +08:00
wwylele 7c5a76e58b log: replace all NGLOG with LOG 2018-06-29 14:18:07 +03:00
NarcolepticK 958d39a76f applets: Migrate logging macros 2018-06-22 04:24:54 -04:00
Daniel Lim Wee Soong 730f8a4103 Fix formatting mistakes 2018-03-28 22:28:55 +08:00
Daniel Lim Wee Soong 20776b37be Fix wrongly converted specifiers
Sorry that was a lot in one go so some of them had some mistakes
2018-03-27 23:37:36 +08:00
Daniel Lim Wee Soong 968569aa61 Replace format specifiers for all usages of ASSERT_MSG 2018-03-27 23:28:42 +08:00
James Rowe f61141e86a Update the entire application to use the new clang format style 2018-03-09 10:54:43 -07:00
wwylele 92f0064b47
APT/Applet: move applet managing into its own class 2018-01-25 22:20:08 +02:00
Subv 3652809408 HLE: Convert GSP_GPU to ServiceFramework.
The only functional change is the error handling of GSP_GPU::ReadHWRegs function. We previously didn't return error codes (not even for success). The new returns were found by reverse engineering the GSP module.
2017-12-21 10:30:22 -05:00
B3n30 e9a95b2e7d
CoreTiming: Reworked CoreTiming (#3119)
* CoreTiming: New CoreTiming; Add Test for CoreTiming
2017-11-25 14:56:57 +01:00
wwylele 499508389c core: clear format warnings 2017-11-01 12:35:32 +02:00
mailwl 11f2eff17d Remove _flag in var names 2017-09-04 12:15:15 +03:00
mailwl 589babbf74 Mii Selector Applet: update Mii structures 2017-09-04 12:04:12 +03:00
Subv 145a7293a3 HLE/Applets: Fixed some conversion warnings when creating the framebuffer shared memory objects. 2017-08-21 08:34:27 -05:00