mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2025-07-23 14:19:55 -06:00
make it hiDPI compliant (I hope)
also misc tweaks
This commit is contained in:
@ -1236,7 +1236,7 @@ void RenderFrame()
|
|||||||
glBlitFramebuffer(0, 0, ScreenW, ScreenH, 0, 0, ScreenW/2, ScreenH/2, GL_COLOR_BUFFER_BIT, GL_LINEAR);
|
glBlitFramebuffer(0, 0, ScreenW, ScreenH, 0, 0, ScreenW/2, ScreenH/2, GL_COLOR_BUFFER_BIT, GL_LINEAR);
|
||||||
}
|
}
|
||||||
|
|
||||||
glBindFramebuffer(GL_FRAMEBUFFER, FramebufferID[FrontBuffer]);
|
//glBindFramebuffer(GL_FRAMEBUFFER, FramebufferID[FrontBuffer]);
|
||||||
FrontBuffer = FrontBuffer ? 0 : 1;
|
FrontBuffer = FrontBuffer ? 0 : 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -102,6 +102,11 @@
|
|||||||
func(GLGETUNIFORMLOCATION, glGetUniformLocation); \
|
func(GLGETUNIFORMLOCATION, glGetUniformLocation); \
|
||||||
func(GLGETUNIFORMBLOCKINDEX, glGetUniformBlockIndex); \
|
func(GLGETUNIFORMBLOCKINDEX, glGetUniformBlockIndex); \
|
||||||
\
|
\
|
||||||
|
func(GLFENCESYNC, glFenceSync); \
|
||||||
|
func(GLDELETESYNC, glDeleteSync); \
|
||||||
|
func(GLWAITSYNC, glWaitSync); \
|
||||||
|
func(GLCLIENTWAITSYNC, glClientWaitSync); \
|
||||||
|
\
|
||||||
func(GLDRAWBUFFERS, glDrawBuffers); \
|
func(GLDRAWBUFFERS, glDrawBuffers); \
|
||||||
\
|
\
|
||||||
func(GLBLENDFUNCSEPARATE, glBlendFuncSeparate); \
|
func(GLBLENDFUNCSEPARATE, glBlendFuncSeparate); \
|
||||||
|
@ -60,12 +60,15 @@
|
|||||||
<height>0</height>
|
<height>0</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="whatsThis">
|
||||||
|
<string><html><head/><body><p>Forward a WAV file to the emulated microphone.</p><p>This input mode is activated by holding the microphone hotkey (see Input and Hotkeys).</p></body></html></string>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="0">
|
<item row="3" column="0">
|
||||||
<widget class="QRadioButton" name="rbMicWav">
|
<widget class="QRadioButton" name="rbMicWav">
|
||||||
<property name="whatsThis">
|
<property name="whatsThis">
|
||||||
<string><html><head/><body><p>Forward a WAV file to the emulated microphone.</p></body></html></string>
|
<string><html><head/><body><p>Forward a WAV file to the emulated microphone.</p><p>This input mode is activated by holding the microphone hotkey (see Input and Hotkeys).</p></body></html></string>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>WAV file:</string>
|
<string>WAV file:</string>
|
||||||
@ -92,7 +95,7 @@
|
|||||||
<item row="2" column="0" colspan="3">
|
<item row="2" column="0" colspan="3">
|
||||||
<widget class="QRadioButton" name="rbMicNoise">
|
<widget class="QRadioButton" name="rbMicNoise">
|
||||||
<property name="whatsThis">
|
<property name="whatsThis">
|
||||||
<string><html><head/><body><p>Noise will be forwarded to the emulated microphone, simulating blowing into the microphone.</p></body></html></string>
|
<string><html><head/><body><p>Noise will be forwarded to the emulated microphone, simulating blowing into the microphone.</p><p>This input mode is activated by holding the microphone hotkey (see Input and Hotkeys).</p></body></html></string>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Blow noise</string>
|
<string>Blow noise</string>
|
||||||
|
@ -874,15 +874,15 @@ void ScreenPanelGL::paintGL()
|
|||||||
{
|
{
|
||||||
int w = width();
|
int w = width();
|
||||||
int h = height();
|
int h = height();
|
||||||
|
float factor = devicePixelRatioF();
|
||||||
|
|
||||||
glClear(GL_COLOR_BUFFER_BIT);
|
glClear(GL_COLOR_BUFFER_BIT);
|
||||||
|
|
||||||
// TODO: check hiDPI compliance of this
|
glViewport(0, 0, w*factor, h*factor);
|
||||||
glViewport(0, 0, w, h);
|
|
||||||
|
|
||||||
screenShader->bind();
|
screenShader->bind();
|
||||||
|
|
||||||
screenShader->setUniformValue("uScreenSize", (float)w, (float)h);
|
screenShader->setUniformValue("uScreenSize", (float)w*factor, (float)h*factor);
|
||||||
|
|
||||||
int frontbuf = GPU::FrontBuffer;
|
int frontbuf = GPU::FrontBuffer;
|
||||||
glActiveTexture(GL_TEXTURE0);
|
glActiveTexture(GL_TEXTURE0);
|
||||||
|
Reference in New Issue
Block a user