Revision 10f5bff6 os-win32.c

b/os-win32.c
84 84
}
85 85

  
86 86
/* Look for support files in the same directory as the executable.  */
87
char *os_find_datadir(const char *argv0)
87
char *os_find_datadir(void)
88 88
{
89
    char *p;
90
    char buf[MAX_PATH];
91
    DWORD len;
92

  
93
    len = GetModuleFileName(NULL, buf, sizeof(buf) - 1);
94
    if (len == 0) {
95
        return NULL;
96
    }
97

  
98
    buf[len] = 0;
99
    p = buf + len - 1;
100
    while (p != buf && *p != '\\')
101
        p--;
102
    *p = 0;
103
    if (access(buf, R_OK) == 0) {
104
        return g_strdup(buf);
105
    }
106
    return NULL;
89
    return qemu_get_exec_dir();
107 90
}
108 91

  
109 92
void os_set_line_buffering(void)

Also available in: Unified diff