X-Git-Url: http://git.osdn.jp/view?a=blobdiff_plain;f=gtk%2Fsrc%2Fghb-dvd.c;h=1d3422caf5eebe3bfa934ffd821df507350687d6;hb=9460d9624a5cf24126bc39605bc47d43330fcdf4;hp=c20b8fa3e354ccd3ac247c92e1259af8c8833710;hpb=36a671f292962b77dbc744eb7a8c91f1f2aa9d6c;p=handbrake-jp%2Fhandbrake-jp-git.git diff --git a/gtk/src/ghb-dvd.c b/gtk/src/ghb-dvd.c index c20b8fa3..1d3422ca 100644 --- a/gtk/src/ghb-dvd.c +++ b/gtk/src/ghb-dvd.c @@ -37,6 +37,10 @@ * Free Software Foundation version 2 of the License. */ +#if defined(_WIN32) +#include +#endif + #include #include @@ -315,7 +319,6 @@ ghb_dvd_volname(const gchar *device) } #endif -#if defined(__linux__) gchar* ghb_resolve_symlink(const gchar *name) { @@ -359,12 +362,11 @@ ghb_resolve_symlink(const gchar *name) g_object_unref(gfile); return file; } -#endif void ghb_dvd_set_current(const gchar *name, signal_user_data_t *ud) { -#if defined(__linux__) +#if !defined(_WIN32) GFile *gfile; GFileInfo *info; gchar *resolved = ghb_resolve_symlink(name); @@ -395,11 +397,19 @@ ghb_dvd_set_current(const gchar *name, signal_user_data_t *ud) } g_object_unref(gfile); #else + gchar drive[4]; + guint dtype; + if (ud->current_dvd_device != NULL) { g_free(ud->current_dvd_device); ud->current_dvd_device = NULL; } - ud->current_dvd_device = g_strdup(name);; + g_strlcpy(drive, name, 4); + dtype = GetDriveType(drive); + if (dtype == DRIVE_CDROM) + { + ud->current_dvd_device = g_strdup(name); + } #endif }