Commit graph

44 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
Steveice10 d9d0fc63ec
applet: Fix HLE applet pre-start lifecycle. (#6362) 2023-03-25 22:36:14 +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 781d4b787a Address first batch of review comments 2019-04-07 15:35:32 +02: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
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 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 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
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 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
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
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
Subv 145a7293a3 HLE/Applets: Fixed some conversion warnings when creating the framebuffer shared memory objects. 2017-08-21 08:34:27 -05:00
Yuri Kunde Schlesner e91f2b7663 Remove some unnecessary inclusions of video_core.h 2017-05-27 18:41:24 -07:00
Lioncash 963aedd8cc Add all services to the Service namespace
Previously there was a split where some of the services were in the
Service namespace and others were not.
2016-12-11 00:07:27 +00:00
Lioncash f1709b8b59 applet: Move common IsRunning underlying variable to the Applet class
Gets rid of basic duplication.
2016-12-07 17:13:46 -05:00
Subv d7ab4fd53d APT/Applets: Renamed the members of the SignalType enum.
Names now make sense and match 3dbrew.
2016-11-19 13:42:07 -05:00
Yuri Kunde Schlesner 84fbbe2629 Use negative priorities to avoid special-casing the self-include 2016-09-21 00:15:56 -07:00
Emmanuel Gil Peyrot ebdae19fd2 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
Emmanuel Gil Peyrot dc8479928c Sources: Run clang-format on everything. 2016-09-18 09:38:01 +09:00
MerryMage fddd243b17 APT: Remove use of Memory::GetPointer 2016-05-21 11:14:12 -05:00
MerryMage aa84cab4e9 Applets/swkdb: Remove use of Memory::GetPointer 2016-05-21 11:14:10 -05:00
Subv ac2de12ed8 HLE/Applets: Give each applet its own block of heap memory, and use that when creating the framebuffer shared memory block. 2016-05-12 20:01:59 -05:00
Subv 1bd0cf542f Kernel/SharedMemory: Properly implemented shared memory support.
Applications can request the kernel to allocate a piece of the linear heap for them when creating a shared memory object.
Shared memory areas are now properly mapped into the target processes when calling svcMapMemoryBlock.

Removed the APT Shared Font hack as it is no longer needed.
2016-05-12 20:00:32 -05:00
Subv 6970b7d3d5 HLE/Applets: Use the correct size for the framebuffer SharedMemory in the swkbd and MiiSelector applets. 2016-05-07 10:01:40 -05:00
Emmanuel Gil Peyrot fe909b3b5a Core: Fix applet includes using iwyu. 2015-07-12 22:10:37 +01:00
Subv 725d5eea78 Applets: Reworked how the Applet update event is handled.
Applets are now cleaned up in AppletUpdateEvent after calling their respective Update method.
2015-07-11 22:32:12 -05:00
Subv 621ee10eae Applets: Add infrastructure to allow custom drawing and input handling in Applets. 2015-07-11 21:47:23 -05:00
Subv 2a6ebadf66 HLE/APT: Initial HLE support for applets.
Currently only the SWKBD is emulated, and there's currently no way to ask the user for input, so it always returns "Subv" as the text.
2015-07-11 21:47:22 -05:00