Skip to content

Commit

Permalink
Merge pull request #35 from Bestoa/master
Browse files Browse the repository at this point in the history
Fix bug in 64bit windows
  • Loading branch information
bpurnomo authored May 3, 2017
2 parents 221f90f + 8e1d4ce commit 66df74e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Common/Source/Win32/esUtil_win32.c
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,12 @@ GLboolean WinCreate ( ESContext *esContext, const char *title )

// Set the ESContext* to the GWL_USERDATA so that it is available to the
// ESWindowProc
SetWindowLongPtr ( esContext->eglNativeWindow, GWL_USERDATA, ( LONG ) ( LONG_PTR ) esContext );
#ifdef _WIN64
//In LLP64 LONG is stll 32bit.
SetWindowLongPtr( esContext->eglNativeWindow, GWL_USERDATA, ( LONGLONG ) ( LONG_PTR )esContext);
#else
SetWindowLongPtr ( esContext->eglNativeWindow, GWL_USERDATA, ( LONG ) ( LONG_PTR ) esContext );
#endif


if ( esContext->eglNativeWindow == NULL )
Expand Down

0 comments on commit 66df74e

Please sign in to comment.