Okay, I've sussed it!
In 'BRL.dxgraphics.mod/d3d7graphics.bmx' @ line 49
(Thanks to 'Ed From Mars' for this one)
In 'BRL.GLGraphics/glgraphics.win32.c' @ line 144
All should be working now after a build mods.
In 'BRL.dxgraphics.mod/d3d7graphics.bmx' @ line 49
(Thanks to 'Ed From Mars' for this one)
Function CreateHWND(width,height,fullscreen) Local style,ex_style,hwnd Local hinst=GetModuleHandleA(0) Global wndClas If Not wndClas Local wc:WNDCLASS=New WNDCLASS wc.hIcon=LoadIconA(hinst,Byte Ptr(101)) ' Added by yan wc.hInstance=hinst wc.lpfnWndProc=WndProc wc.hCursor=LoadCursorA( Null,Byte Ptr IDC_ARROW ) wc.lpszClassName=DX_CLASS_NAME wndClas=RegisterClassA( wc ) If Not wndClas Throw "Failed to register window class" EndIf EndIf Local wndTitle:Byte Ptr=AppTitle.ToCString() If fullscreen style=WS_VISIBLE|WS_POPUP hwnd=CreateWindowExA( 0,DX_CLASS_NAME,wndTitle,style,0,0,width,height,0,0,hinst,Null ) Else style=WS_VISIBLE|WS_CAPTION|WS_SYSMENU Local rect[]=[0,0,width,height] AdjustWindowRect rect,style,0 width=rect[2]-rect[0] height=rect[3]-rect[1] hwnd=CreateWindowExA( 0,DX_CLASS_NAME,wndTitle,style,CW_USEDEFAULT,CW_USEDEFAULT,width,height,0,0,hinst,Null ) EndIf MemFree wndTitle If Not hwnd Throw "Failed to create window" Return hwnd End Function
In 'BRL.GLGraphics/glgraphics.win32.c' @ line 144
static void _initWndClass(){ static int _done; if( _done ) return; WNDCLASS wc={0}; wc.style=CS_HREDRAW|CS_VREDRAW|CS_OWNDC; wc.lpfnWndProc=(WNDPROC)_wndProc; wc.hInstance=GetModuleHandle(0); wc.hIcon=LoadIcon(GetModuleHandle(0),(const char*)101); //Added by yan wc.lpszClassName=CLASS_NAME; wc.hCursor=(HCURSOR)LoadCursor( 0,IDC_ARROW ); wc.hbrBackground=0;//(HBRUSH)GetStockObject(BLACK_BRUSH); if( !RegisterClass( &wc ) ) exit(-1); _done=1; }
All should be working now after a build mods.