- w_path = emu_wrap_path(path);
- ret = fopen(w_path, mode);
- emu_wrap_path_free(w_path, path);
+ if (strcmp(path, "/etc/pointercal") == 0) {
+ // use local pontercal, not host's
+ ret = fopen("pointercal", mode);
+ if (ret == NULL) {
+ ret = fopen("pointercal", "w");
+ if (ret != NULL) {
+ fwrite(wm97xx_p, 1, sizeof(wm97xx_p), ret);
+ fclose(ret);
+ }
+ ret = fopen("pointercal", mode);
+ }
+ }
+ else {
+ w_path = emu_wrap_path(path);
+ ret = fopen(w_path, mode);
+ emu_wrap_path_free(w_path, path);
+ }