Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
b66478df
Commit
b66478df
authored
Nov 02, 2010
by
Henri Verbeet
Committed by
Alexandre Julliard
Nov 02, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Set an A window proc on non-unicode windows.
parent
cb3a133b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
8 deletions
+32
-8
device.c
dlls/wined3d/device.c
+9
-3
wined3d_main.c
dlls/wined3d/wined3d_main.c
+22
-4
wined3d_private.h
dlls/wined3d/wined3d_private.h
+1
-1
No files found.
dlls/wined3d/device.c
View file @
b66478df
...
...
@@ -6916,14 +6916,17 @@ void get_drawable_size_backbuffer(struct wined3d_context *context, UINT *width,
*
height
=
swapchain
->
presentParms
.
BackBufferHeight
;
}
LRESULT
device_process_message
(
IWineD3DDeviceImpl
*
device
,
HWND
window
,
LRESULT
device_process_message
(
IWineD3DDeviceImpl
*
device
,
HWND
window
,
BOOL
unicode
,
UINT
message
,
WPARAM
wparam
,
LPARAM
lparam
,
WNDPROC
proc
)
{
if
(
device
->
filter_messages
)
{
TRACE
(
"Filtering message: window %p, message %#x, wparam %#lx, lparam %#lx.
\n
"
,
window
,
message
,
wparam
,
lparam
);
return
DefWindowProcW
(
window
,
message
,
wparam
,
lparam
);
if
(
unicode
)
return
DefWindowProcW
(
window
,
message
,
wparam
,
lparam
);
else
return
DefWindowProcA
(
window
,
message
,
wparam
,
lparam
);
}
if
(
message
==
WM_DESTROY
)
...
...
@@ -6935,5 +6938,8 @@ LRESULT device_process_message(IWineD3DDeviceImpl *device, HWND window,
else
ERR
(
"Window %p is not the focus window for device %p.
\n
"
,
window
,
device
);
}
return
CallWindowProcW
(
proc
,
window
,
message
,
wparam
,
lparam
);
if
(
unicode
)
return
CallWindowProcW
(
proc
,
window
,
message
,
wparam
,
lparam
);
else
return
CallWindowProcA
(
proc
,
window
,
message
,
wparam
,
lparam
);
}
dlls/wined3d/wined3d_main.c
View file @
b66478df
...
...
@@ -32,6 +32,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d);
struct
wined3d_wndproc
{
HWND
window
;
BOOL
unicode
;
WNDPROC
proc
;
IWineD3DDeviceImpl
*
device
;
};
...
...
@@ -394,6 +395,7 @@ static LRESULT CALLBACK wined3d_wndproc(HWND window, UINT message, WPARAM wparam
{
struct
wined3d_wndproc
*
entry
;
IWineD3DDeviceImpl
*
device
;
BOOL
unicode
;
WNDPROC
proc
;
wined3d_mutex_lock
();
...
...
@@ -407,10 +409,11 @@ static LRESULT CALLBACK wined3d_wndproc(HWND window, UINT message, WPARAM wparam
}
device
=
entry
->
device
;
unicode
=
entry
->
unicode
;
proc
=
entry
->
proc
;
wined3d_mutex_unlock
();
return
device_process_message
(
device
,
window
,
message
,
wparam
,
lparam
,
proc
);
return
device_process_message
(
device
,
window
,
unicode
,
message
,
wparam
,
lparam
,
proc
);
}
BOOL
wined3d_register_window
(
HWND
window
,
IWineD3DDeviceImpl
*
device
)
...
...
@@ -440,7 +443,14 @@ BOOL wined3d_register_window(HWND window, IWineD3DDeviceImpl *device)
entry
=
&
wndproc_table
.
entries
[
wndproc_table
.
count
++
];
entry
->
window
=
window
;
entry
->
proc
=
(
WNDPROC
)
SetWindowLongPtrW
(
window
,
GWLP_WNDPROC
,
(
LONG_PTR
)
wined3d_wndproc
);
entry
->
unicode
=
IsWindowUnicode
(
window
);
/* Set a window proc that matches the window. Some applications (e.g. NoX)
* replace the window proc after we've set ours, and expect to be able to
* call the previous one (ours) directly, without using CallWindowProc(). */
if
(
entry
->
unicode
)
entry
->
proc
=
(
WNDPROC
)
SetWindowLongPtrW
(
window
,
GWLP_WNDPROC
,
(
LONG_PTR
)
wined3d_wndproc
);
else
entry
->
proc
=
(
WNDPROC
)
SetWindowLongPtrA
(
window
,
GWLP_WNDPROC
,
(
LONG_PTR
)
wined3d_wndproc
);
entry
->
device
=
device
;
wined3d_mutex_unlock
();
...
...
@@ -460,8 +470,16 @@ void wined3d_unregister_window(HWND window)
struct
wined3d_wndproc
*
entry
=
&
wndproc_table
.
entries
[
i
];
struct
wined3d_wndproc
*
last
=
&
wndproc_table
.
entries
[
--
wndproc_table
.
count
];
if
(
GetWindowLongPtrW
(
window
,
GWLP_WNDPROC
)
==
(
LONG_PTR
)
wined3d_wndproc
)
SetWindowLongPtrW
(
window
,
GWLP_WNDPROC
,
(
LONG_PTR
)
entry
->
proc
);
if
(
entry
->
unicode
)
{
if
(
GetWindowLongPtrW
(
window
,
GWLP_WNDPROC
)
==
(
LONG_PTR
)
wined3d_wndproc
)
SetWindowLongPtrW
(
window
,
GWLP_WNDPROC
,
(
LONG_PTR
)
entry
->
proc
);
}
else
{
if
(
GetWindowLongPtrA
(
window
,
GWLP_WNDPROC
)
==
(
LONG_PTR
)
wined3d_wndproc
)
SetWindowLongPtrA
(
window
,
GWLP_WNDPROC
,
(
LONG_PTR
)
entry
->
proc
);
}
if
(
entry
!=
last
)
*
entry
=
*
last
;
wined3d_mutex_unlock
();
...
...
dlls/wined3d/wined3d_private.h
View file @
b66478df
...
...
@@ -1769,7 +1769,7 @@ HRESULT device_init(IWineD3DDeviceImpl *device, IWineD3DImpl *wined3d,
UINT
adapter_idx
,
WINED3DDEVTYPE
device_type
,
HWND
focus_window
,
DWORD
flags
,
IWineD3DDeviceParent
*
device_parent
)
DECLSPEC_HIDDEN
;
void
device_preload_textures
(
IWineD3DDeviceImpl
*
device
)
DECLSPEC_HIDDEN
;
LRESULT
device_process_message
(
IWineD3DDeviceImpl
*
device
,
HWND
window
,
LRESULT
device_process_message
(
IWineD3DDeviceImpl
*
device
,
HWND
window
,
BOOL
unicode
,
UINT
message
,
WPARAM
wparam
,
LPARAM
lparam
,
WNDPROC
proc
)
DECLSPEC_HIDDEN
;
void
device_resource_add
(
IWineD3DDeviceImpl
*
This
,
IWineD3DResource
*
resource
)
DECLSPEC_HIDDEN
;
void
device_resource_released
(
IWineD3DDeviceImpl
*
This
,
IWineD3DResource
*
resource
)
DECLSPEC_HIDDEN
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment