mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-30 06:32:42 +00:00
Move PAINTSTRUCT to WM_PAINT only.
This commit is contained in:
parent
b01ebedbd8
commit
3de0da7f93
@ -171,8 +171,6 @@ void wnd_schedule_proc(int (*proc) (void))
|
|||||||
*/
|
*/
|
||||||
static LRESULT CALLBACK directx_wnd_proc(HWND wnd, UINT message, WPARAM wparam, LPARAM lparam)
|
static LRESULT CALLBACK directx_wnd_proc(HWND wnd, UINT message, WPARAM wparam, LPARAM lparam)
|
||||||
{
|
{
|
||||||
PAINTSTRUCT ps;
|
|
||||||
|
|
||||||
if (message == msg_call_proc)
|
if (message == msg_call_proc)
|
||||||
return ((int (*)(void))wparam) ();
|
return ((int (*)(void))wparam) ();
|
||||||
|
|
||||||
@ -277,6 +275,7 @@ static LRESULT CALLBACK directx_wnd_proc(HWND wnd, UINT message, WPARAM wparam,
|
|||||||
|
|
||||||
case WM_PAINT:
|
case WM_PAINT:
|
||||||
if (!user_wnd_proc || win_gfx_driver) {
|
if (!user_wnd_proc || win_gfx_driver) {
|
||||||
|
PAINTSTRUCT ps;
|
||||||
BeginPaint(wnd, &ps);
|
BeginPaint(wnd, &ps);
|
||||||
if (win_gfx_driver && win_gfx_driver->paint)
|
if (win_gfx_driver && win_gfx_driver->paint)
|
||||||
win_gfx_driver->paint(&ps.rcPaint);
|
win_gfx_driver->paint(&ps.rcPaint);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user