[PATCH v2 1/3] opengl32: add wrapper for wglCreateContext
Zebediah Figura
z.figura12 at gmail.com
Mon Feb 25 14:53:14 CST 2019
On 02/25/2019 12:35 PM, Zebediah Figura wrote:
> On 02/25/2019 11:34 AM, Stefan Riesenberger wrote:
>> v2:
>> make functions static
>>
>> v1:
>> This prevents a stack overflow when using Reshade, which hooks these functions.
>>
>> Signed-off-by: Stefan Riesenberger <stefan.riesenberger at gmail.com>
>> ---
>> dlls/opengl32/wgl.c | 20 ++++++++++++++------
>> 1 file changed, 14 insertions(+), 6 deletions(-)
>>
>> diff --git a/dlls/opengl32/wgl.c b/dlls/opengl32/wgl.c
>> index 92410053d5..c6018b0c7b 100644
>> --- a/dlls/opengl32/wgl.c
>> +++ b/dlls/opengl32/wgl.c
>> @@ -398,9 +398,9 @@ HDC WINAPI wglGetCurrentDC(void)
>> }
>>
>> /***********************************************************************
>> - * wglCreateContext (OPENGL32.@)
>> + * wgl_create_context wrapper for hooking
>> */
>> -HGLRC WINAPI wglCreateContext(HDC hdc)
>> +static HGLRC wgl_create_context(HDC hdc)
>> {
>> HGLRC ret = 0;
>> struct wgl_context *drv_ctx;
>> @@ -419,6 +419,14 @@ HGLRC WINAPI wglCreateContext(HDC hdc)
>> return ret;
>> }
>>
>> +/***********************************************************************
>> + * wglCreateContext (OPENGL32.@)
>> + */
>> +HGLRC WINAPI wglCreateContext(HDC hdc)
>> +{
>> + return wgl_create_context(hdc);
>> +}
>> +
>
> Does using DECLSPEC_HOTPATCH work instead? That might be better.
>
Sorry, I misunderstood the purpose of the patch. Ignore this comment.
More information about the wine-devel
mailing list