mirror of
https://github.com/thunderbrewhq/thunderbrew
synced 2025-12-12 03:02:30 +00:00
feat(gx): handle custom window proc in device creation
This commit is contained in:
parent
de0050d111
commit
9ccd1884f3
8 changed files with 13 additions and 11 deletions
|
|
@ -357,7 +357,9 @@ LRESULT CGxDeviceD3d::WindowProcD3d(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM
|
|||
break;
|
||||
}
|
||||
|
||||
// TODO
|
||||
if (device && device->m_windowProc) {
|
||||
return device->m_windowProc(hWnd, uMsg, wParam, lParam);
|
||||
}
|
||||
|
||||
return DefWindowProc(hWnd, uMsg, wParam, lParam);
|
||||
}
|
||||
|
|
@ -428,7 +430,7 @@ int32_t CGxDeviceD3d::CreatePoolAPI(CGxPool* pool) {
|
|||
return 1;
|
||||
}
|
||||
|
||||
int32_t CGxDeviceD3d::DeviceCreate(long (*windowProc)(void*, uint32_t, uint32_t, long), const CGxFormat& format) {
|
||||
int32_t CGxDeviceD3d::DeviceCreate(int32_t (*windowProc)(void* window, uint32_t message, uint32_t wparam, int32_t lparam), const CGxFormat& format) {
|
||||
this->m_ownhwnd = 1;
|
||||
|
||||
// TODO gamma ramp
|
||||
|
|
|
|||
|
|
@ -241,7 +241,7 @@ class CGxDeviceD3d : public CGxDevice {
|
|||
// Virtual member functions
|
||||
virtual void ITexMarkAsUpdated(CGxTex* texId);
|
||||
virtual void IRsSendToHw(EGxRenderState which);
|
||||
virtual int32_t DeviceCreate(long (*windowProc)(void*, uint32_t, uint32_t, long), const CGxFormat& format);
|
||||
virtual int32_t DeviceCreate(int32_t (*windowProc)(void* window, uint32_t message, uint32_t wparam, int32_t lparam), const CGxFormat& format);
|
||||
virtual int32_t DeviceSetFormat(const CGxFormat& format);
|
||||
virtual void DeviceWM(EGxWM wm, uintptr_t param1, uintptr_t param2);
|
||||
virtual void CapsWindowSize(CRect& dst);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue