MCPcopy Create free account
hub / github.com/HandBrake/HandBrake / FindFirstCDROM

Function FindFirstCDROM

gtk/src/presets.c:1097–1121  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1095
1096#if defined(_WIN32)
1097gchar*
1098FindFirstCDROM(void)
1099{
1100 gint ii, drives;
1101 gchar drive[5];
1102
1103 strcpy(drive, "A:" G_DIR_SEPARATOR_S);
1104 drives = GetLogicalDrives();
1105 for (ii = 0; ii < 26; ii++)
1106 {
1107 if (drives & 0x01)
1108 {
1109 guint dtype;
1110
1111 drive[0] = 'A' + ii;
1112 dtype = GetDriveType(drive);
1113 if (dtype == DRIVE_CDROM)
1114 {
1115 return g_strdup(drive);
1116 }
1117 }
1118 drives >>= 1;
1119 }
1120 return NULL;
1121}
1122#endif
1123
1124void

Callers 1

ghb_prefs_loadFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected