void fetch_saveimagepath (TCHAR *out, int size, int dir) { fetch_path("SaveimagePath", out, size); out[0] = '\0'; if (g_libamiga_save_image_path) { strcpy(out, g_libamiga_save_image_path); } }
bool paths::pnpoly(path::vertex_type::axis_type x, path::vertex_type::axis_type y) const { for (unsigned int i = 0; i < size(); ++i) if (fetch_path(i)->pnpoly(x, y)) return true; return false; }
void fetch_saveimagepath (TCHAR *out, int size, int dir) { /* assert (size > MAX_DPATH); fetch_path ("SaveimagePath", out, size); if (dir) { out[_tcslen (out) - 1] = 0; createdir (out);*/ fetch_path ("SaveimagePath", out, size); // } }
int target_cfgfile_load (struct uae_prefs *p, const TCHAR *filename, int type, int isdefault) { int v, i, type2; int ct, ct2 = 0;//, size; char tmp1[MAX_DPATH], tmp2[MAX_DPATH]; char fname[MAX_DPATH]; _tcscpy (fname, filename); if (!zfile_exists (fname)) { fetch_configurationpath (fname, sizeof (fname) / sizeof (TCHAR)); if (_tcsncmp (fname, filename, _tcslen (fname))) _tcscat (fname, filename); else _tcscpy (fname, filename); } if (!isdefault) qs_override = 1; if (type < 0) { type = 0; cfgfile_get_description (fname, NULL, NULL, NULL, &type); } if (type == 0 || type == 1) { discard_prefs (p, 0); } type2 = type; if (type == 0) { default_prefs (p, type); } //regqueryint (NULL, "ConfigFile_NoAuto", &ct2); v = cfgfile_load (p, fname, &type2, ct2, isdefault ? 0 : 1); if (!v) return v; if (type > 0) return v; for (i = 1; i <= 2; i++) { if (type != i) { // size = sizeof (ct); ct = 0; //regqueryint (NULL, configreg2[i], &ct); if (ct && ((i == 1 && p->config_hardware_path[0] == 0) || (i == 2 && p->config_host_path[0] == 0) || ct2)) { // size = sizeof (tmp1) / sizeof (TCHAR); //regquerystr (NULL, configreg[i], tmp1, &size); fetch_path ("ConfigurationPath", tmp2, sizeof (tmp2) / sizeof (TCHAR)); _tcscat (tmp2, tmp1); v = i; cfgfile_load (p, tmp2, &v, 1, 0); } } } v = 1; return v; }
rectf paths::bbox(void) const { if (size() == 0) return rectf{0, 0, 0, 0}; else { rectf bbox = fetch_path(0)->bbox(); for (unsigned int i = 1; i < size(); ++i) { rectf bbox2 = fetch_path(i)->bbox(); if (bbox.left > bbox2.left ) bbox.left = bbox2.left; if (bbox.right < bbox2.right ) bbox.right = bbox2.right; if (bbox.top > bbox2.top ) bbox.top = bbox2.top; if (bbox.bottom < bbox2.bottom) bbox.bottom = bbox2.bottom; } return bbox; } }
void fetch_datapath (TCHAR *out, int size) { fetch_path (NULL, out, size); }
void fetch_inputfilepath (TCHAR *out, int size) { fetch_path ("InputPath", out, size); }
void fetch_statefilepath (TCHAR *out, int size) { fetch_path ("StatefilePath", out, size); }
void fetch_ripperpath (TCHAR *out, int size) { fetch_path ("RipperPath", out, size); }
void fetch_screenshotpath (TCHAR *out, int size) { fetch_path ("ScreenshotPath", out, size); }
void fetch_configurationpath (TCHAR *out, int size) { fetch_path ("ConfigurationPath", out, size); }
void fetch_rompath (TCHAR *out, int size) { fetch_path ("KickstartPath", out, size); }