Report resolution scaling support for vi and am
Specifying an internal resolution in yuzu now will report the scaled changes to vi and am.
This commit is contained in:
parent
87eca5b209
commit
9359655712
|
@ -471,11 +471,15 @@ void ICommonStateGetter::GetDefaultDisplayResolution(Kernel::HLERequestContext&
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(RESULT_SUCCESS);
|
||||||
|
|
||||||
if (Settings::values.use_docked_mode) {
|
if (Settings::values.use_docked_mode) {
|
||||||
rb.Push(static_cast<u32>(Service::VI::DisplayResolution::DockedWidth));
|
rb.Push(static_cast<u32>(Service::VI::DisplayResolution::DockedWidth) *
|
||||||
rb.Push(static_cast<u32>(Service::VI::DisplayResolution::DockedHeight));
|
static_cast<u32>(Settings::values.resolution_factor));
|
||||||
|
rb.Push(static_cast<u32>(Service::VI::DisplayResolution::DockedHeight) *
|
||||||
|
static_cast<u32>(Settings::values.resolution_factor));
|
||||||
} else {
|
} else {
|
||||||
rb.Push(static_cast<u32>(Service::VI::DisplayResolution::UndockedWidth));
|
rb.Push(static_cast<u32>(Service::VI::DisplayResolution::UndockedWidth) *
|
||||||
rb.Push(static_cast<u32>(Service::VI::DisplayResolution::UndockedHeight));
|
static_cast<u32>(Settings::values.resolution_factor));
|
||||||
|
rb.Push(static_cast<u32>(Service::VI::DisplayResolution::UndockedHeight) *
|
||||||
|
static_cast<u32>(Settings::values.resolution_factor));
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG_DEBUG(Service_AM, "called");
|
LOG_DEBUG(Service_AM, "called");
|
||||||
|
|
|
@ -494,7 +494,9 @@ private:
|
||||||
|
|
||||||
if (transaction == TransactionId::Connect) {
|
if (transaction == TransactionId::Connect) {
|
||||||
IGBPConnectRequestParcel request{ctx.ReadBuffer()};
|
IGBPConnectRequestParcel request{ctx.ReadBuffer()};
|
||||||
IGBPConnectResponseParcel response{1280, 720};
|
IGBPConnectResponseParcel response{
|
||||||
|
static_cast<u32>(1280 * Settings::values.resolution_factor),
|
||||||
|
static_cast<u32>(720 * Settings::values.resolution_factor)};
|
||||||
ctx.WriteBuffer(response.Serialize());
|
ctx.WriteBuffer(response.Serialize());
|
||||||
} else if (transaction == TransactionId::SetPreallocatedBuffer) {
|
} else if (transaction == TransactionId::SetPreallocatedBuffer) {
|
||||||
IGBPSetPreallocatedBufferRequestParcel request{ctx.ReadBuffer()};
|
IGBPSetPreallocatedBufferRequestParcel request{ctx.ReadBuffer()};
|
||||||
|
@ -670,11 +672,15 @@ private:
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(RESULT_SUCCESS);
|
||||||
|
|
||||||
if (Settings::values.use_docked_mode) {
|
if (Settings::values.use_docked_mode) {
|
||||||
rb.Push(static_cast<u32>(Service::VI::DisplayResolution::DockedWidth));
|
rb.Push(static_cast<u32>(Service::VI::DisplayResolution::DockedWidth) *
|
||||||
rb.Push(static_cast<u32>(Service::VI::DisplayResolution::DockedHeight));
|
static_cast<u32>(Settings::values.resolution_factor));
|
||||||
|
rb.Push(static_cast<u32>(Service::VI::DisplayResolution::DockedHeight) *
|
||||||
|
static_cast<u32>(Settings::values.resolution_factor));
|
||||||
} else {
|
} else {
|
||||||
rb.Push(static_cast<u32>(Service::VI::DisplayResolution::UndockedWidth));
|
rb.Push(static_cast<u32>(Service::VI::DisplayResolution::UndockedWidth) *
|
||||||
rb.Push(static_cast<u32>(Service::VI::DisplayResolution::UndockedHeight));
|
static_cast<u32>(Settings::values.resolution_factor));
|
||||||
|
rb.Push(static_cast<u32>(Service::VI::DisplayResolution::UndockedHeight) *
|
||||||
|
static_cast<u32>(Settings::values.resolution_factor));
|
||||||
}
|
}
|
||||||
|
|
||||||
rb.PushRaw<float>(60.0f);
|
rb.PushRaw<float>(60.0f);
|
||||||
|
@ -879,11 +885,15 @@ private:
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(RESULT_SUCCESS);
|
||||||
|
|
||||||
if (Settings::values.use_docked_mode) {
|
if (Settings::values.use_docked_mode) {
|
||||||
rb.Push(static_cast<u64>(DisplayResolution::DockedWidth));
|
rb.Push(static_cast<u64>(DisplayResolution::DockedWidth) *
|
||||||
rb.Push(static_cast<u64>(DisplayResolution::DockedHeight));
|
static_cast<u32>(Settings::values.resolution_factor));
|
||||||
|
rb.Push(static_cast<u64>(DisplayResolution::DockedHeight) *
|
||||||
|
static_cast<u32>(Settings::values.resolution_factor));
|
||||||
} else {
|
} else {
|
||||||
rb.Push(static_cast<u64>(DisplayResolution::UndockedWidth));
|
rb.Push(static_cast<u64>(DisplayResolution::UndockedWidth) *
|
||||||
rb.Push(static_cast<u64>(DisplayResolution::UndockedHeight));
|
static_cast<u32>(Settings::values.resolution_factor));
|
||||||
|
rb.Push(static_cast<u64>(DisplayResolution::UndockedHeight) *
|
||||||
|
static_cast<u32>(Settings::values.resolution_factor));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -900,6 +910,8 @@ private:
|
||||||
void ListDisplays(Kernel::HLERequestContext& ctx) {
|
void ListDisplays(Kernel::HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
DisplayInfo display_info;
|
DisplayInfo display_info;
|
||||||
|
display_info.width *= static_cast<u64>(Settings::values.resolution_factor);
|
||||||
|
display_info.height *= static_cast<u64>(Settings::values.resolution_factor);
|
||||||
ctx.WriteBuffer(&display_info, sizeof(DisplayInfo));
|
ctx.WriteBuffer(&display_info, sizeof(DisplayInfo));
|
||||||
IPC::ResponseBuilder rb{ctx, 4};
|
IPC::ResponseBuilder rb{ctx, 4};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(RESULT_SUCCESS);
|
||||||
|
|
|
@ -23,31 +23,31 @@
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QCheckBox" name="toggle_frame_limit">
|
<widget class="QCheckBox" name="toggle_frame_limit">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Limit Speed Percent</string>
|
<string>Limit Speed Percent</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QSpinBox" name="frame_limit">
|
<widget class="QSpinBox" name="frame_limit">
|
||||||
<property name="suffix">
|
<property name="suffix">
|
||||||
<string>%</string>
|
<string>%</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="minimum">
|
<property name="minimum">
|
||||||
<number>1</number>
|
<number>1</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="maximum">
|
<property name="maximum">
|
||||||
<number>9999</number>
|
<number>9999</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="value">
|
<property name="value">
|
||||||
<number>100</number>
|
<number>100</number>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QCheckBox" name="use_accurate_gpu_emulation">
|
<widget class="QCheckBox" name="use_accurate_gpu_emulation">
|
||||||
|
@ -61,7 +61,7 @@
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label">
|
<widget class="QLabel" name="label">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Internal Resolution:(Currently does nothing.)</string>
|
<string>Internal Resolution</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
@ -96,27 +96,27 @@
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="bg_label">
|
<widget class="QLabel" name="bg_label">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Background Color:</string>
|
<string>Background Color:</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="bg_button">
|
<widget class="QPushButton" name="bg_button">
|
||||||
<property name="maximumSize">
|
<property name="maximumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>40</width>
|
<width>40</width>
|
||||||
<height>16777215</height>
|
<height>16777215</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
|
Reference in New Issue