- client: show nvidia driver version as 314.07 instead of 314.7

This commit is contained in:
David Anderson 2013-02-18 11:54:38 -08:00 committed by Oliver Bock
parent b6add1668d
commit c3ec0e91de
2 changed files with 5 additions and 8 deletions

View File

@ -403,7 +403,7 @@ void COPROC_NVIDIA::description(char* buf) {
#else
int maj = display_driver_version/100;
int min = display_driver_version%100;
sprintf(vers, "%d.%d", maj, min);
sprintf(vers, "%d.%02d", maj, min);
#endif
} else {
strcpy(vers, "unknown");

View File

@ -47,12 +47,12 @@ char authenticator[256];
bool async_mode = false;
// represents a command.
// if out is NULL the command is in progress;
// otherwise it's the output
//
struct COMMAND {
char* in;
// the input, in a malloc'd buffer
char* out;
// if NULL the command is in progress; otherwise it's the output
};
typedef map<int, COMMAND*> COMMANDS;
@ -377,15 +377,12 @@ void read_config() {
}
int main() {
char* p;
int retval;
read_config();
while (1) {
p = get_cmd();
char* p = get_cmd();
if (p == NULL) break;
COMMAND c;
c.in = p;
retval = handle_command(c);
if (retval) break;
handle_command(c);
}
}