Skip to content

Commit

Permalink
[LIBNX] Fix Switch video driver with enabled GL build
Browse files Browse the repository at this point in the history
  • Loading branch information
m4xw committed Sep 28, 2018
1 parent 624ffc9 commit a8555a7
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions gfx/drivers/switch_nx_gfx.c
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,18 @@ static void *switch_init(const video_info_t *video,
*input_data = switchinput;
}

#ifdef HAVE_LIBNX
#ifdef HAVE_OPENGL
// Init Resolution before initDefault
gfxInitResolution(1280, 720);

gfxInitDefault();
gfxSetMode(GfxMode_TiledDouble);

gfxConfigureTransform(0);
#endif // HAVE_OPENGL
#endif

font_driver_init_osd(sw, false,
video->is_threaded,
FONT_DRIVER_RENDER_SWITCH);
Expand Down Expand Up @@ -512,6 +524,12 @@ static void switch_free(void *data)
free(sw->menu_texture.pixels);

free(sw);

#ifdef HAVE_LIBNX
#ifdef HAVE_OPENGL
gfxExit();
#endif // HAVE_OPENGL
#endif
}

static bool switch_set_shader(void *data,
Expand Down

0 comments on commit a8555a7

Please sign in to comment.