mirror of
https://github.com/mpv-player/mpv
synced 2024-11-03 03:19:24 +01:00
Check setGlWindow return value to fail properly instead of crashing if e.g.
no OpenGL support is available. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29612 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
986499e97e
commit
a1f744cb07
@ -571,7 +571,8 @@ config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uin
|
||||
glconfig:
|
||||
if (vo_config_count)
|
||||
uninitGl();
|
||||
setGlWindow(&gl_vinfo, &gl_context, vo_window);
|
||||
if (setGlWindow(&gl_vinfo, &gl_context, vo_window) == SET_WINDOW_FAILED)
|
||||
return -1;
|
||||
initGl(vo_dwidth, vo_dheight);
|
||||
|
||||
return 0;
|
||||
|
@ -637,7 +637,8 @@ config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uin
|
||||
#endif
|
||||
return -1;
|
||||
|
||||
setGlWindow(&gl_vinfo, &gl_context, vo_window);
|
||||
if (setGlWindow(&gl_vinfo, &gl_context, vo_window) == SET_WINDOW_FAILED)
|
||||
return -1;
|
||||
|
||||
glVersion = glGetString(GL_VERSION);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user