ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/BasiliskII/src/Windows/util_windows.cpp
(Generate patch)

Comparing BasiliskII/src/Windows/util_windows.cpp (file contents):
Revision 1.3 by gbeauche, 2005-01-30T21:42:15Z vs.
Revision 1.4 by gbeauche, 2005-03-19T19:01:49Z

# Line 22 | Line 22
22  
23   #include "sysdeps.h"
24   #include "util_windows.h"
25 + #include "main.h"
26  
27   BOOL exists( const char *path )
28   {
# Line 105 | Line 106 | void kill_thread(HANDLE thread)
106   {
107          TerminateThread(thread, 0);
108   }
109 +
110 +
111 + /*
112 + *  Check that drivers are installed
113 + */
114 +
115 + bool check_drivers(void)
116 + {
117 +        char path[_MAX_PATH];
118 +        GetSystemDirectory(path, sizeof(path));
119 +        strcat(path, "\\drivers\\cdenable.sys");
120 +
121 +        if (exists(path)) {
122 +                int32 size = get_file_size(path);
123 +                if (size != 6112) {
124 +                        char str[256];
125 +                        sprintf(str, "The CD-ROM driver file \"%s\" is too old or corrupted.", path);
126 +                        ErrorAlert(str);
127 +                        return false;
128 +                }
129 +        }
130 +        else {
131 +                char str[256];
132 +                sprintf(str, "The CD-ROM driver file \"%s\" is missing.", path);
133 +                WarningAlert(str);
134 +        }
135 +
136 +        return true;
137 + }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines