CDVD: polishing rebase and fixing nullptr bug

This commit is contained in:
Gauvain 'GovanifY' Roussel-Tarbouriech 2020-09-04 08:36:09 +02:00 committed by refractionpcsx2
parent fd70ddda02
commit c4fa3e3304
4 changed files with 4 additions and 2 deletions

View File

@ -3,7 +3,6 @@
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
set(msg_dep_common_libs "check these libraries -> wxWidgets (>=3.0), aio") set(msg_dep_common_libs "check these libraries -> wxWidgets (>=3.0), aio")
set(msg_dep_pcsx2 "check these libraries -> wxWidgets (>=3.0), gtk2, zlib (>=1.2.4), pcsx2 common libs") set(msg_dep_pcsx2 "check these libraries -> wxWidgets (>=3.0), gtk2, zlib (>=1.2.4), pcsx2 common libs")
set(msg_dep_cdvdgiga "check these libraries -> gtk2, libudev")
set(msg_dep_gsdx "check these libraries -> opengl, png (>=1.2), zlib (>=1.2.4), X11, liblzma") set(msg_dep_gsdx "check these libraries -> opengl, png (>=1.2), zlib (>=1.2.4), X11, liblzma")
set(msg_dep_onepad "check these libraries -> sdl2, X11, gtk2") set(msg_dep_onepad "check these libraries -> sdl2, X11, gtk2")
set(msg_dep_spu2x "check these libraries -> soundtouch (>=1.5), alsa, portaudio (optional, >=1.9), sdl (>=1.2), pcsx2 common libs") set(msg_dep_spu2x "check these libraries -> soundtouch (>=1.5), alsa, portaudio (optional, >=1.9), sdl (>=1.2), pcsx2 common libs")

View File

@ -321,6 +321,9 @@ s32 cdvdDirectReadSector(u32 sector, s32 mode, u8* buffer)
{ {
static u8 data[2352 * sectors_per_read]; static u8 data[2352 * sectors_per_read];
if(src == nullptr)
return -1;
try { try {
if (sector >= src->GetSectorCount()) if (sector >= src->GetSectorCount())
return -1; return -1;

View File

@ -1180,6 +1180,7 @@ void SysStatus( const wxString& text )
void SysUpdateIsoSrcFile( const wxString& newIsoFile ) void SysUpdateIsoSrcFile( const wxString& newIsoFile )
{ {
g_Conf->CurrentIso = newIsoFile; g_Conf->CurrentIso = newIsoFile;
sMainFrame.UpdateStatusBar();
sMainFrame.UpdateCdvdSrcSelection(); sMainFrame.UpdateCdvdSrcSelection();
} }

View File

@ -229,7 +229,6 @@ void MainEmuFrame::ConnectMenus()
Bind(wxEVT_MENU, &MainEmuFrame::Menu_IsoClear_Click, this, MenuId_IsoClear); Bind(wxEVT_MENU, &MainEmuFrame::Menu_IsoClear_Click, this, MenuId_IsoClear);
Bind(wxEVT_MENU, &MainEmuFrame::Menu_CdvdSource_Click, this, MenuId_Src_Iso); Bind(wxEVT_MENU, &MainEmuFrame::Menu_CdvdSource_Click, this, MenuId_Src_Iso);
Bind(wxEVT_MENU, &MainEmuFrame::Menu_DiscBrowse_Click, this, MenuId_DriveSelector); Bind(wxEVT_MENU, &MainEmuFrame::Menu_DiscBrowse_Click, this, MenuId_DriveSelector);
Bind(wxEVT_MENU, &MainEmuFrame::Menu_DriveSelector_Click, this, MenuId_DriveSelector);
Bind(wxEVT_MENU, &MainEmuFrame::Menu_CdvdSource_Click, this, MenuId_Src_Disc); Bind(wxEVT_MENU, &MainEmuFrame::Menu_CdvdSource_Click, this, MenuId_Src_Disc);
Bind(wxEVT_MENU, &MainEmuFrame::Menu_CdvdSource_Click, this, MenuId_Src_NoDisc); Bind(wxEVT_MENU, &MainEmuFrame::Menu_CdvdSource_Click, this, MenuId_Src_NoDisc);
Bind(wxEVT_MENU, &MainEmuFrame::Menu_Ask_On_Boot_Click, this, MenuId_Ask_On_Booting); Bind(wxEVT_MENU, &MainEmuFrame::Menu_Ask_On_Boot_Click, this, MenuId_Ask_On_Booting);