mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-11-16 00:30:05 +00:00
am: Return StubApplet instead of nullptr when AppletId not found
This commit is contained in:
parent
699900eed0
commit
f820e58be4
@ -6,8 +6,6 @@
|
|||||||
#include <cinttypes>
|
#include <cinttypes>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include <stack>
|
#include <stack>
|
||||||
#include "applets/applets.h"
|
|
||||||
#include "applets/software_keyboard.h"
|
|
||||||
#include "audio_core/audio_renderer.h"
|
#include "audio_core/audio_renderer.h"
|
||||||
#include "core/core.h"
|
#include "core/core.h"
|
||||||
#include "core/hle/ipc_helpers.h"
|
#include "core/hle/ipc_helpers.h"
|
||||||
@ -18,6 +16,9 @@
|
|||||||
#include "core/hle/service/am/am.h"
|
#include "core/hle/service/am/am.h"
|
||||||
#include "core/hle/service/am/applet_ae.h"
|
#include "core/hle/service/am/applet_ae.h"
|
||||||
#include "core/hle/service/am/applet_oe.h"
|
#include "core/hle/service/am/applet_oe.h"
|
||||||
|
#include "core/hle/service/am/applets/applets.h"
|
||||||
|
#include "core/hle/service/am/applets/software_keyboard.h"
|
||||||
|
#include "core/hle/service/am/applets/stub_applet.h"
|
||||||
#include "core/hle/service/am/idle.h"
|
#include "core/hle/service/am/idle.h"
|
||||||
#include "core/hle/service/am/omm.h"
|
#include "core/hle/service/am/omm.h"
|
||||||
#include "core/hle/service/am/spsm.h"
|
#include "core/hle/service/am/spsm.h"
|
||||||
@ -761,8 +762,9 @@ static std::shared_ptr<Applets::Applet> GetAppletFromId(AppletId id) {
|
|||||||
case AppletId::SoftwareKeyboard:
|
case AppletId::SoftwareKeyboard:
|
||||||
return std::make_shared<Applets::SoftwareKeyboard>();
|
return std::make_shared<Applets::SoftwareKeyboard>();
|
||||||
default:
|
default:
|
||||||
UNREACHABLE_MSG("Unimplemented AppletId [{:08X}]!", static_cast<u32>(id));
|
LOG_ERROR(Service_AM, "Unimplemented AppletId [{:08X}]! -- Falling back to stub!",
|
||||||
return nullptr;
|
static_cast<u32>(id));
|
||||||
|
return std::make_shared<Applets::StubApplet>();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,7 +2,12 @@
|
|||||||
// Licensed under GPLv2 or any later version
|
// Licensed under GPLv2 or any later version
|
||||||
// Refer to the license.txt file included.
|
// Refer to the license.txt file included.
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
|
||||||
#include "common/hex_util.h"
|
#include "common/hex_util.h"
|
||||||
|
#include "common/logging/log.h"
|
||||||
|
#include "core/hle/result.h"
|
||||||
|
#include "core/hle/service/am/am.h"
|
||||||
#include "core/hle/service/am/applets/stub_applet.h"
|
#include "core/hle/service/am/applets/stub_applet.h"
|
||||||
|
|
||||||
namespace Service::AM::Applets {
|
namespace Service::AM::Applets {
|
||||||
|
@ -4,13 +4,6 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <array>
|
|
||||||
#include <string>
|
|
||||||
#include <vector>
|
|
||||||
|
|
||||||
#include "common/common_funcs.h"
|
|
||||||
#include "common/swap.h"
|
|
||||||
#include "core/hle/service/am/am.h"
|
|
||||||
#include "core/hle/service/am/applets/applets.h"
|
#include "core/hle/service/am/applets/applets.h"
|
||||||
|
|
||||||
namespace Service::AM::Applets {
|
namespace Service::AM::Applets {
|
||||||
|
Loading…
Reference in New Issue
Block a user