Minor decoder optimizations, kernel fixes, cpu backend fixes
This commit is contained in:
@@ -195,7 +195,8 @@ void XCustomRegisterDynamicActions_entry() {
|
||||
DECLARE_XAM_EXPORT1(XCustomRegisterDynamicActions, kNone, kStub);
|
||||
|
||||
dword_result_t XGetAVPack_entry() {
|
||||
// Value from https://github.com/Free60Project/libxenon/blob/920146f/libxenon/drivers/xenos/xenos_videomodes.h
|
||||
// Value from
|
||||
// https://github.com/Free60Project/libxenon/blob/920146f/libxenon/drivers/xenos/xenos_videomodes.h
|
||||
// DWORD
|
||||
// Not sure what the values are for this, but 6 is VGA.
|
||||
// Other likely values are 3/4/8 for HDMI or something.
|
||||
@@ -321,11 +322,16 @@ void XamLoaderTerminateTitle_entry() {
|
||||
}
|
||||
DECLARE_XAM_EXPORT1(XamLoaderTerminateTitle, kNone, kSketchy);
|
||||
|
||||
dword_result_t XamAlloc_entry(dword_t unk, dword_t size, lpdword_t out_ptr) {
|
||||
assert_true(unk == 0);
|
||||
dword_result_t XamAlloc_entry(dword_t flags, dword_t size, lpdword_t out_ptr) {
|
||||
if (flags & 0x00100000) { // HEAP_ZERO_memory used unless this flag
|
||||
// do nothing!
|
||||
// maybe we ought to fill it with nonzero garbage, but otherwise this is a
|
||||
// flag we can safely ignore
|
||||
}
|
||||
|
||||
// Allocate from the heap. Not sure why XAM does this specially, perhaps
|
||||
// it keeps stuff in a separate heap?
|
||||
//chrispy: there is a set of different heaps it uses, an array of them. the top 4 bits of the 32 bit flags seems to select the heap
|
||||
uint32_t ptr = kernel_state()->memory()->SystemHeapAlloc(size);
|
||||
*out_ptr = ptr;
|
||||
|
||||
|
||||
@@ -55,6 +55,7 @@ class XamDialog : public xe::ui::ImGuiDialog {
|
||||
XamDialog(xe::ui::ImGuiDrawer* imgui_drawer)
|
||||
: xe::ui::ImGuiDialog(imgui_drawer) {}
|
||||
|
||||
virtual ~XamDialog() {}
|
||||
void OnClose() override {
|
||||
if (close_callback_) {
|
||||
close_callback_();
|
||||
@@ -254,6 +255,7 @@ class MessageBoxDialog : public XamDialog {
|
||||
Close();
|
||||
}
|
||||
}
|
||||
virtual ~MessageBoxDialog() {}
|
||||
|
||||
private:
|
||||
bool has_opened_ = false;
|
||||
@@ -264,8 +266,7 @@ class MessageBoxDialog : public XamDialog {
|
||||
uint32_t chosen_button_ = 0;
|
||||
};
|
||||
|
||||
// https://www.se7ensins.com/forums/threads/working-xshowmessageboxui.844116/
|
||||
dword_result_t XamShowMessageBoxUI_entry(
|
||||
static dword_result_t XamShowMessageBoxUi(
|
||||
dword_t user_index, lpu16string_t title_ptr, lpu16string_t text_ptr,
|
||||
dword_t button_count, lpdword_t button_ptrs, dword_t active_button,
|
||||
dword_t flags, lpdword_t result_ptr, pointer_t<XAM_OVERLAPPED> overlapped) {
|
||||
@@ -321,8 +322,28 @@ dword_result_t XamShowMessageBoxUI_entry(
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
// https://www.se7ensins.com/forums/threads/working-xshowmessageboxui.844116/
|
||||
dword_result_t XamShowMessageBoxUI_entry(
|
||||
dword_t user_index, lpu16string_t title_ptr, lpu16string_t text_ptr,
|
||||
dword_t button_count, lpdword_t button_ptrs, dword_t active_button,
|
||||
dword_t flags, lpdword_t result_ptr, pointer_t<XAM_OVERLAPPED> overlapped) {
|
||||
return XamShowMessageBoxUi(user_index, title_ptr, text_ptr, button_count,
|
||||
button_ptrs, active_button, flags, result_ptr,
|
||||
overlapped);
|
||||
}
|
||||
DECLARE_XAM_EXPORT1(XamShowMessageBoxUI, kUI, kImplemented);
|
||||
|
||||
dword_result_t XamShowMessageBoxUIEx_entry(
|
||||
dword_t user_index, lpu16string_t title_ptr, lpu16string_t text_ptr,
|
||||
dword_t button_count, lpdword_t button_ptrs, dword_t active_button,
|
||||
dword_t flags, dword_t unknown_unused, lpdword_t result_ptr,
|
||||
pointer_t<XAM_OVERLAPPED> overlapped) {
|
||||
return XamShowMessageBoxUi(user_index, title_ptr, text_ptr, button_count,
|
||||
button_ptrs, active_button, flags, result_ptr,
|
||||
overlapped);
|
||||
}
|
||||
DECLARE_XAM_EXPORT1(XamShowMessageBoxUIEx, kUI, kImplemented);
|
||||
class KeyboardInputDialog : public XamDialog {
|
||||
public:
|
||||
KeyboardInputDialog(xe::ui::ImGuiDrawer* imgui_drawer, std::string title,
|
||||
@@ -347,6 +368,7 @@ class KeyboardInputDialog : public XamDialog {
|
||||
xe::string_util::copy_truncating(text_buffer_.data(), default_text_,
|
||||
text_buffer_.size());
|
||||
}
|
||||
virtual ~KeyboardInputDialog() {}
|
||||
|
||||
const std::string& text() const { return text_; }
|
||||
bool cancelled() const { return cancelled_; }
|
||||
|
||||
Reference in New Issue
Block a user