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