mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-04-12 18:08:55 +02:00
windows?
This commit is contained in:
parent
57ccf51d99
commit
36b77f2e47
10 changed files with 33 additions and 15 deletions
|
|
@ -257,7 +257,7 @@ Result AlbumManager::SaveScreenShot(ApplicationAlbumEntry& out_entry,
|
|||
static_service->GetStandardUserSystemClock(&user_clock);
|
||||
|
||||
s64 posix_time{};
|
||||
auto result = user_clock->GetCurrentTime(&posix_time);
|
||||
auto result = user_clock->GetCurrentClockTime(&posix_time);
|
||||
|
||||
if (result.IsError()) {
|
||||
return result;
|
||||
|
|
@ -279,7 +279,7 @@ Result AlbumManager::SaveEditedScreenShot(ApplicationAlbumEntry& out_entry,
|
|||
static_service->GetStandardUserSystemClock(&user_clock);
|
||||
|
||||
s64 posix_time{};
|
||||
auto result = user_clock->GetCurrentTime(&posix_time);
|
||||
auto result = user_clock->GetCurrentClockTime(&posix_time);
|
||||
|
||||
if (result.IsError()) {
|
||||
return result;
|
||||
|
|
|
|||
|
|
@ -232,7 +232,7 @@ INotificationServices::INotificationServices(Core::System& system_)
|
|||
{2020, nullptr, "IsAlarmSettingReady"},
|
||||
{8000, nullptr, "RegisterAppletResourceUserId"},
|
||||
{8010, nullptr, "UnregisterAppletResourceUserId"},
|
||||
{8999, nullptr, "GetCurrentTime"},
|
||||
{8999, nullptr, "GetCurrentClockTime"},
|
||||
{9000, nullptr, "GetAlarmSettingNextNotificationTime"},
|
||||
};
|
||||
// clang-format on
|
||||
|
|
|
|||
|
|
@ -1,3 +1,6 @@
|
|||
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
|
|
@ -13,7 +16,7 @@ void FileTimestampWorker::SetFilesystemPosixTime() {
|
|||
Service::PSC::Time::CalendarTime calendar_time{};
|
||||
Service::PSC::Time::CalendarAdditionalInfo additional_info{};
|
||||
|
||||
if (m_initialized && m_system_clock->GetCurrentTime(&time) == ResultSuccess &&
|
||||
if (m_initialized && m_system_clock->GetCurrentClockTime(&time) == ResultSuccess &&
|
||||
m_time_zone->ToCalendarTimeWithMyRule(&calendar_time, &additional_info, time) ==
|
||||
ResultSuccess) {
|
||||
// TODO IFileSystemProxy::SetCurrentPosixTime
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
|
||||
|
|
@ -179,7 +179,7 @@ TimeManager::TimeManager(Core::System& system)
|
|||
m_file_timestamp_worker.m_initialized = true;
|
||||
|
||||
s64 system_clock_time{};
|
||||
if (m_file_timestamp_worker.m_system_clock->GetCurrentTime(&system_clock_time) ==
|
||||
if (m_file_timestamp_worker.m_system_clock->GetCurrentClockTime(&system_clock_time) ==
|
||||
ResultSuccess) {
|
||||
Service::PSC::Time::CalendarTime calendar_time{};
|
||||
Service::PSC::Time::CalendarAdditionalInfo calendar_additional{};
|
||||
|
|
|
|||
|
|
@ -201,7 +201,7 @@ void TimeWorker::ThreadFunc(std::stop_token stop_token) {
|
|||
m_set_sys->SetNetworkSystemClockContext(context);
|
||||
|
||||
s64 time{};
|
||||
if (m_network_clock->GetCurrentTime(&time) != ResultSuccess) {
|
||||
if (m_network_clock->GetCurrentClockTime(&time) != ResultSuccess) {
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
@ -230,7 +230,7 @@ void TimeWorker::ThreadFunc(std::stop_token stop_token) {
|
|||
}
|
||||
|
||||
s64 time{};
|
||||
res = m_ephemeral_clock->GetCurrentTime(&time);
|
||||
res = m_ephemeral_clock->GetCurrentClockTime(&time);
|
||||
if (res != ResultSuccess) {
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,6 @@
|
|||
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
|
|
@ -45,7 +48,7 @@ NetworkSystemClockContextWriter::NetworkSystemClockContextWriter(Core::System& s
|
|||
|
||||
Result NetworkSystemClockContextWriter::Write(const SystemClockContext& context) {
|
||||
s64 time{};
|
||||
[[maybe_unused]] auto res = m_system_clock.GetCurrentTime(&time);
|
||||
[[maybe_unused]] auto res = m_system_clock.GetCurrentClockTime(&time);
|
||||
|
||||
if (m_in_use) {
|
||||
R_SUCCEED_IF(context == m_context);
|
||||
|
|
|
|||
|
|
@ -1,3 +1,6 @@
|
|||
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
|
|
@ -20,7 +23,7 @@ bool SystemClockCore::CheckClockSourceMatches() {
|
|||
return context.steady_time_point.IdMatches(time_point);
|
||||
}
|
||||
|
||||
Result SystemClockCore::GetCurrentTime(s64* out_time) const {
|
||||
Result SystemClockCore::GetCurrentClockTime(s64* out_time) const {
|
||||
R_UNLESS(out_time != nullptr, ResultInvalidArgument);
|
||||
|
||||
SystemClockContext context{};
|
||||
|
|
|
|||
|
|
@ -1,3 +1,6 @@
|
|||
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
|
|
@ -33,7 +36,7 @@ public:
|
|||
|
||||
bool CheckClockSourceMatches();
|
||||
|
||||
Result GetCurrentTime(s64* out_time) const;
|
||||
Result GetCurrentClockTime(s64* out_time) const;
|
||||
Result SetCurrentTime(s64 time);
|
||||
|
||||
Result GetCurrentTimePoint(SteadyClockTimePoint& out_time_point) {
|
||||
|
|
|
|||
|
|
@ -1,3 +1,6 @@
|
|||
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
|
|
@ -15,7 +18,7 @@ SystemClock::SystemClock(Core::System& system_, SystemClockCore& clock_core, boo
|
|||
can_write_uninitialized_clock} {
|
||||
// clang-format off
|
||||
static const FunctionInfo functions[] = {
|
||||
{0, D<&SystemClock::GetCurrentTime>, "GetCurrentTime"},
|
||||
{0, D<&SystemClock::GetCurrentClockTime>, "GetCurrentClockTime"},
|
||||
{1, D<&SystemClock::SetCurrentTime>, "SetCurrentTime"},
|
||||
{2, D<&SystemClock::GetSystemClockContext>, "GetSystemClockContext"},
|
||||
{3, D<&SystemClock::SetSystemClockContext>, "SetSystemClockContext"},
|
||||
|
|
@ -25,7 +28,7 @@ SystemClock::SystemClock(Core::System& system_, SystemClockCore& clock_core, boo
|
|||
RegisterHandlers(functions);
|
||||
}
|
||||
|
||||
Result SystemClock::GetCurrentTime(Out<s64> out_time) {
|
||||
Result SystemClock::GetCurrentClockTime(Out<s64> out_time) {
|
||||
SCOPE_EXIT {
|
||||
LOG_DEBUG(Service_Time, "called. out_time={}", *out_time);
|
||||
};
|
||||
|
|
@ -33,7 +36,7 @@ Result SystemClock::GetCurrentTime(Out<s64> out_time) {
|
|||
R_UNLESS(m_can_write_uninitialized_clock || m_clock_core.IsInitialized(),
|
||||
ResultClockUninitialized);
|
||||
|
||||
R_RETURN(m_clock_core.GetCurrentTime(out_time.Get()));
|
||||
R_RETURN(m_clock_core.GetCurrentClockTime(out_time.Get()));
|
||||
}
|
||||
|
||||
Result SystemClock::SetCurrentTime(s64 time) {
|
||||
|
|
|
|||
|
|
@ -1,3 +1,6 @@
|
|||
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
|
|
@ -23,7 +26,7 @@ public:
|
|||
|
||||
~SystemClock() override = default;
|
||||
|
||||
Result GetCurrentTime(Out<s64> out_time);
|
||||
Result GetCurrentClockTime(Out<s64> out_time);
|
||||
Result SetCurrentTime(s64 time);
|
||||
Result GetSystemClockContext(Out<SystemClockContext> out_context);
|
||||
Result SetSystemClockContext(const SystemClockContext& context);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue