(DRM) Should fix segfault

This commit is contained in:
twinaphex 2017-01-18 15:23:06 +01:00
parent 6fde55ac9d
commit f0820f6433
3 changed files with 6 additions and 4 deletions

View File

@ -64,11 +64,11 @@ bool drm_get_resources(int fd)
return true;
}
bool drm_get_connector(int fd, unsigned video_monitor_index)
bool drm_get_connector(int fd, video_frame_info_t video_info)
{
unsigned i;
unsigned monitor_index = 0;
unsigned monitor = MAX(video_monitor_index, 1);
unsigned monitor = MAX(video_info.monitor_index, 1);
/* Enumerate all connectors. */

View File

@ -27,6 +27,8 @@
#include <retro_common_api.h>
#include <retro_inline.h>
#include "../video_driver.h"
RETRO_BEGIN_DECLS
extern uint32_t g_connector_id;
@ -51,7 +53,7 @@ void drm_setup(int fd);
void drm_free(void);
bool drm_get_connector(int fd, unsigned video_monitor_index);
bool drm_get_connector(int fd, video_frame_info_t video_info);
static INLINE bool drm_wait_flip(int timeout)
{

View File

@ -393,7 +393,7 @@ nextgpu:
if (!drm_get_resources(fd))
goto nextgpu;
if (!drm_get_connector(video_info.monitor_index, fd))
if (!drm_get_connector(fd, video_info))
goto nextgpu;
if (!drm_get_encoder(fd))