DXGL r606 - Code Review

Jump to navigation Jump to search
Repository:DXGL
Revision:r605‎ | r606 | r607 >
Date:19:22, 11 April 2015
Author:admin
Status:new
Tags:
Comment:
Fix BufferObject build and object creation.
Fix crash on focus loss before primary surface is created.
Modified paths:
  • /ddraw/BufferObject.cpp (modified) (history)
  • /ddraw/BufferObject.h (modified) (history)
  • /ddraw/glDirectDraw.cpp (modified) (history)

Diff [purge]

Index: ddraw/BufferObject.cpp
@@ -33,6 +33,7 @@
3434 buffer->ext = ext;
3535 buffer->util = util;
3636 ext->glGenBuffers(1, &buffer->buffer);
 37+ *out = buffer;
3738 }
3839
3940 void BufferObject_AddRef(BufferObject *This)
Index: ddraw/BufferObject.h
@@ -21,6 +21,7 @@
2222
2323 #ifdef __cplusplus
2424 extern "C" {
 25+class glUtil;
2526 #else
2627 typedef int glUtil;
2728 #endif
Index: ddraw/glDirectDraw.cpp
@@ -1908,7 +1908,7 @@
19091909 if(dwFlags & 0xFFFFFFFA) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
19101910 if(dwFlags == 5) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
19111911 if(!lastsync) lastsync = true;
1912 - else primary->RenderScreen(primary->texture,primary,1);
 1912+ else if(primary) primary->RenderScreen(primary->texture,primary,1);
19131913 TRACE_EXIT(23,DD_OK);
19141914 return DD_OK;
19151915 }