Small update of opengl32.
Modified: trunk/reactos/lib/opengl32/gl.c
Modified: trunk/reactos/lib/opengl32/wgl.c
_____
Modified: trunk/reactos/lib/opengl32/gl.c
--- trunk/reactos/lib/opengl32/gl.c 2005-02-05 00:04:52 UTC (rev
13409)
+++ trunk/reactos/lib/opengl32/gl.c 2005-02-05 00:07:57 UTC (rev
13410)
@@ -61,11 +61,12 @@
#if defined(_M_IX86)
# define FOO(x) #x
# define X(func, ret, typeargs, args, icdidx, tebidx, stack) \
-__asm__(".globl _"#func"@"#stack
"\n\t" \
+__asm__(".align 4" "\n\t"
\
+ ".globl _"#func"@"#stack
"\n\t" \
"_"#func"@"#stack":"
"\n\t" \
- " movl %fs:0x18, %eax" "\n\t" \
- " movl 0xbe8(%eax), %eax" "\n\t"
\
- " jmp *"FOO((icdidx*4))"(%eax)"
"\n\t");
+ " movl %fs:0x18, %eax" "\n\t"
\
+ " movl 0xbe8(%eax), %eax" "\n\t"
\
+ " jmp *"FOO((icdidx*4))"(%eax)"
"\n\t");
GLFUNCS_MACRO
# undef FOO
@@ -74,19 +75,19 @@
# define X(func, ret, typeargs, args, icdidx, tebidx, stack) \
ret STDCALL func typeargs \
{ \
- PROC *table;
\
- PROC fn;
\
- if (tebidx >= 0 && 0)
\
- {
\
- table = (PROC *)NtCurrentTeb()->glDispatchTable;
\
- fn = table[tebidx];
\
- }
\
- else
\
- {
\
- table = (PROC *)NtCurrentTeb()->glTable;
\
- fn = table[icdidx];
\
- }
\
- return (ret)((ret(*)typeargs)fn)args;
\
+ PROC *table; \
+ PROC fn; \
+ if (tebidx >= 0 && 0) \
+ { \
+ table = (PROC *)NtCurrentTeb()->glDispatchTable; \
+ fn = table[tebidx]; \
+ } \
+ else \
+ { \
+ table = (PROC *)NtCurrentTeb()->glTable; \
+ fn = table[icdidx]; \
+ } \
+ return (ret)((ret(*)typeargs)fn)args; \
}
GLFUNCS_MACRO
_____
Modified: trunk/reactos/lib/opengl32/wgl.c
--- trunk/reactos/lib/opengl32/wgl.c 2005-02-05 00:04:52 UTC (rev
13409)
+++ trunk/reactos/lib/opengl32/wgl.c 2005-02-05 00:07:57 UTC (rev
13410)
@@ -10,6 +10,7 @@
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
+#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "teb.h"
@@ -334,6 +335,15 @@
}
/* load driver (or get a reference) */
dcdata->icd = OPENGL32_LoadICD( info.driver_name );
+ if (dcdata->icd == NULL)
+ {
+ WCHAR Buffer[256];
+ snwprintf(Buffer, sizeof(Buffer)/sizeof(WCHAR),
+ L"Couldn't load driver
\"%s\".",
driverName);
+ MessageBox(WindowFromDC( hdc ), Buffer,
+ L"OPENGL32.dll: Warning",
+ MB_OK | MB_ICONWARNING);
+ }
}
return dcdata->icd;
@@ -398,7 +408,6 @@
#undef X
DBGPRINT( "Done." );
-/* DBGBREAK();*/
return ERROR_SUCCESS;
}
@@ -894,7 +903,6 @@
if (glrc->hglrc != NULL)
{
DBGPRINT( "Info: Calling DrvSetContext!" );
- DBGBREAK();
icdTable = glrc->icd->DrvSetContext( hdc,
glrc->hglrc,
ROSGL_SetContextCallBack );
if (icdTable == NULL)