mirror of
https://github.com/AppleWin/AppleWin.git
synced 2025-01-10 13:29:56 +00:00
-load-state: set CWD to path of .aws.yaml file
This commit is contained in:
parent
749e1514bd
commit
c4dfbaf988
@ -1090,6 +1090,14 @@ int APIENTRY WinMain(HINSTANCE passinstance, HINSTANCE, LPSTR lpCmdLine, int)
|
|||||||
|
|
||||||
if (szSnapshotName)
|
if (szSnapshotName)
|
||||||
{
|
{
|
||||||
|
std::string strPathname(szSnapshotName);
|
||||||
|
int nIdx = strPathname.find_last_of('\\');
|
||||||
|
if (nIdx >= 0 && nIdx+1 < (int)strPathname.length())
|
||||||
|
{
|
||||||
|
std::string strPath = strPathname.substr(0, nIdx+1);
|
||||||
|
SetCurrentImageDir(strPath.c_str());
|
||||||
|
}
|
||||||
|
|
||||||
// Override value just loaded from Registry by LoadConfiguration()
|
// Override value just loaded from Registry by LoadConfiguration()
|
||||||
// . NB. Registry value is not updated with this cmd-line value
|
// . NB. Registry value is not updated with this cmd-line value
|
||||||
Snapshot_SetFilename(szSnapshotName);
|
Snapshot_SetFilename(szSnapshotName);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user