Skip to content

Commit

Permalink
Fixed some Windows GL bugs.
Browse files Browse the repository at this point in the history
  • Loading branch information
indigoparadox committed May 2, 2023
1 parent a376804 commit b04587b
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
4 changes: 4 additions & 0 deletions src/mtypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,9 @@ typedef unsigned long uint32_t;

#endif /* MAUG_OS_* */

#ifdef MAUG_ANCIENT_C
typedef uint32_t ssize_t;
#endif /* MAUG_ANCIENT_C */

#endif /* !MTYPES_H */

12 changes: 7 additions & 5 deletions src/retroflt.h
Original file line number Diff line number Diff line change
Expand Up @@ -1115,11 +1115,11 @@ struct RETROFLAT_BITMAP {
HDC hdc_mask;
HBITMAP old_hbm_b;
HBITMAP old_hbm_mask;
uint8_t
#ifdef RETROFLAT_API_WIN16
far
#endif /* RETROFLAT_API_WIN16 */
* bits;
# ifdef RETROFLAT_API_WIN16
uint8_t far* bits;
# else
uint8_t* bits;
# endif /* RETROFLAT_API_WIN16 */
ssize_t autolock_refs;
# ifdef RETROFLAT_OPENGL
struct RETROFLAT_GLTEX tex;
Expand Down Expand Up @@ -4620,7 +4620,9 @@ MERROR_RETVAL retroflat_create_bitmap(
bmp_out->tex.bytes,
bmp_out->tex.w * bmp_out->tex.h * sizeof( uint32_t ) );

# ifndef RETROGLU_NO_TEXTURES
glGenTextures( 1, (GLuint*)&(bmp_out->tex.id) );
# endif /* !RETROGLU_NO_TEXTURES */

cleanup:
if( NULL != bmp_out->tex.bytes ) {
Expand Down
2 changes: 1 addition & 1 deletion src/retroglu.h
Original file line number Diff line number Diff line change
Expand Up @@ -1172,7 +1172,7 @@ void retroglu_draw_sprite( struct RETROGLU_SPRITE* sprite ) {
maug_mlock( sprite->texture.tex.bytes_h, sprite->texture.tex.bytes );
maug_cleanup_if_null_alloc( uint8_t*, sprite->texture.tex.bytes );
glTexImage2D( GL_TEXTURE_2D, 0, GL_RGBA,
RETROSOFT_GLYPH_W_SZ, RETROSOFT_GLYPH_H_SZ, 0,
sprite->texture.tex.w, sprite->texture.tex.h, 0,
GL_RGBA, GL_UNSIGNED_BYTE,
sprite->texture.tex.bytes );
#endif /* !RETROGLU_NO_TEXTURES */
Expand Down

0 comments on commit b04587b

Please sign in to comment.