mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Merge pull request #659 from mikusp/master
Qt: Resize GL widget while no game is running
This commit is contained in:
commit
8f9f1e8b98
1 changed files with 5 additions and 1 deletions
|
@ -52,7 +52,10 @@ namespace
|
|||
static void DrawBackground(float alpha) {
|
||||
static float xbase[100] = {0};
|
||||
static float ybase[100] = {0};
|
||||
if (xbase[0] == 0.0f) {
|
||||
static int old_dp_xres = dp_xres;
|
||||
// if window was resized, recalculate animation coordinates
|
||||
if (xbase[0] == 0.0f || dp_xres != old_dp_xres) {
|
||||
old_dp_xres = dp_xres;
|
||||
GMRng rng;
|
||||
for (int i = 0; i < 100; i++) {
|
||||
xbase[i] = rng.F() * dp_xres;
|
||||
|
@ -316,6 +319,7 @@ void EmuThread::run()
|
|||
ReapplyGfxState();
|
||||
|
||||
UIShader_Prepare();
|
||||
glViewport(0, 0, pixel_xres, pixel_yres);
|
||||
UIBegin();
|
||||
DrawBackground(alpha);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue