58 lines
1002 B
C++
58 lines
1002 B
C++
#ifndef _LI_DUMP_DVD_H
|
|
#define _LI_DUMP_DVD_H 1
|
|
#include <iostream>
|
|
#include <string>
|
|
#include <thread>
|
|
#include <mutex>
|
|
|
|
#include "../Scsi/IoCtl.hpp"
|
|
#include "../Scsi/OpticalDrive.hpp"
|
|
|
|
namespace Li::Gui {
|
|
|
|
class DumpDVD {
|
|
private:
|
|
bool keepPolling;
|
|
bool showDemoWindow;
|
|
bool imRippinIt; // dodododo do do!
|
|
|
|
std::mutex* lock;
|
|
|
|
bool error;
|
|
bool done;
|
|
uint64_t sectorsReadSoFar;
|
|
int sectorsAtOnce;
|
|
|
|
int selectedDrive;
|
|
ImGuiWindowFlags windowFlags;
|
|
int selectedDriveSpeed;
|
|
uint32_t counter;
|
|
char outputFile[0x8000];
|
|
|
|
|
|
std::vector<Li::Scsi::OpticalDrive*>* drivesList;
|
|
std::thread* pollDrives;
|
|
|
|
void ripDiscThread();
|
|
void pollDrivesThread();
|
|
|
|
void freeOldDriveList();
|
|
void refreshDriveList();
|
|
std::string getDrivesStr();
|
|
void reset();
|
|
|
|
void startRip();
|
|
void endRipAndGoBackToMenu();
|
|
|
|
void showRipMenu();
|
|
void showRippingStatus();
|
|
|
|
public:
|
|
Li::Scsi::OpticalDrive* GetCurrentSelectedDrive();
|
|
DumpDVD();
|
|
~DumpDVD();
|
|
void RenderUI();
|
|
};
|
|
|
|
}
|
|
#endif |