mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2025-07-26 15:50:00 -06:00
re-add basic scaling
This commit is contained in:
@ -288,6 +288,8 @@ typedef struct uiAreaKeyEvent uiAreaKeyEvent;
|
||||
|
||||
typedef struct uiDrawContext uiDrawContext;
|
||||
|
||||
// TO CONSIDER: the uiAreaHandler param there seems useless
|
||||
// (might use individual callbacks instead of handler struct?)
|
||||
struct uiAreaHandler {
|
||||
void (*Draw)(uiAreaHandler *, uiArea *, uiAreaDrawParams *);
|
||||
// TODO document that resizes cause a full redraw for non-scrolling areas; implementation-defined for scrolling areas
|
||||
@ -297,6 +299,7 @@ struct uiAreaHandler {
|
||||
void (*MouseCrossed)(uiAreaHandler *, uiArea *, int left);
|
||||
void (*DragBroken)(uiAreaHandler *, uiArea *);
|
||||
int (*KeyEvent)(uiAreaHandler *, uiArea *, uiAreaKeyEvent *);
|
||||
void (*Resize)(uiAreaHandler *, uiArea *, int, int);
|
||||
};
|
||||
|
||||
// TODO RTL layouts?
|
||||
|
@ -37,6 +37,11 @@ static LRESULT CALLBACK areaWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM
|
||||
uiWindowsEnsureGetClientRect(a->hwnd, &client);
|
||||
areaDrawOnResize(a, &client);
|
||||
areaScrollOnResize(a, &client);
|
||||
{
|
||||
double w, h;
|
||||
loadAreaSize(a, a->rt, &w, &h);
|
||||
a->ah->Resize(a->ah, a, (int)w, (int)h);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user