Update .vcxproj file and don't crash if fopen fails
This commit is contained in:
@@ -97,7 +97,7 @@
|
|||||||
<TargetMachine>MachineX86</TargetMachine>
|
<TargetMachine>MachineX86</TargetMachine>
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
<SubSystem>Console</SubSystem>
|
<SubSystem>Console</SubSystem>
|
||||||
<AdditionalDependencies>$(CoreLibraryDependencies);%(AdditionalDependencies);D:\Lib\SDL2-2.0.20\lib\x64\sdl2.lib</AdditionalDependencies>
|
<AdditionalDependencies>$(CoreLibraryDependencies);%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
</Link>
|
</Link>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
@@ -116,7 +116,7 @@
|
|||||||
<SubSystem>Console</SubSystem>
|
<SubSystem>Console</SubSystem>
|
||||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
<OptimizeReferences>true</OptimizeReferences>
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
<AdditionalDependencies>$(CoreLibraryDependencies);%(AdditionalDependencies);D:\Lib\SDL2-2.0.20\lib\x64\sdl2.lib</AdditionalDependencies>
|
<AdditionalDependencies>$(CoreLibraryDependencies);%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
</Link>
|
</Link>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||||
@@ -129,7 +129,7 @@
|
|||||||
<LanguageStandard_C>stdc11</LanguageStandard_C>
|
<LanguageStandard_C>stdc11</LanguageStandard_C>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<AdditionalDependencies>$(CoreLibraryDependencies);%(AdditionalDependencies);D:\Lib\SDL2-2.0.20\lib\x64\sdl2.lib</AdditionalDependencies>
|
<AdditionalDependencies>$(CoreLibraryDependencies);%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
</Link>
|
</Link>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||||
@@ -141,7 +141,7 @@
|
|||||||
<LanguageStandard_C>stdc11</LanguageStandard_C>
|
<LanguageStandard_C>stdc11</LanguageStandard_C>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<AdditionalDependencies>$(CoreLibraryDependencies);%(AdditionalDependencies);D:\Lib\SDL2-2.0.20\lib\x64\sdl2.lib</AdditionalDependencies>
|
<AdditionalDependencies>$(CoreLibraryDependencies);%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
</Link>
|
</Link>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
@@ -236,7 +236,6 @@
|
|||||||
<ClInclude Include="features.h" />
|
<ClInclude Include="features.h" />
|
||||||
<ClInclude Include="funcs.h" />
|
<ClInclude Include="funcs.h" />
|
||||||
<ClInclude Include="glsl_shader.h" />
|
<ClInclude Include="glsl_shader.h" />
|
||||||
<ClInclude Include="ida_defs.h" />
|
|
||||||
<ClInclude Include="ida_types.h" />
|
<ClInclude Include="ida_types.h" />
|
||||||
<ClInclude Include="sm_cpu_infra.h" />
|
<ClInclude Include="sm_cpu_infra.h" />
|
||||||
<ClInclude Include="sm_rtl.h" />
|
<ClInclude Include="sm_rtl.h" />
|
||||||
|
|||||||
@@ -263,9 +263,6 @@
|
|||||||
<ClInclude Include="..\third_party\gl_core\gl_core_3_1.h">
|
<ClInclude Include="..\third_party\gl_core\gl_core_3_1.h">
|
||||||
<Filter>Shader</Filter>
|
<Filter>Shader</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="ida_defs.h">
|
|
||||||
<Filter>Source Files</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="packages.config" />
|
<None Include="packages.config" />
|
||||||
|
|||||||
@@ -419,6 +419,10 @@ void RtlSaveLoad(int cmd, int slot) {
|
|||||||
cmd == kSaveLoad_Save ? "Saving" : cmd == kSaveLoad_Load ? "Loading" : "Replaying", slot);
|
cmd == kSaveLoad_Save ? "Saving" : cmd == kSaveLoad_Load ? "Loading" : "Replaying", slot);
|
||||||
if (cmd != kSaveLoad_Save) {
|
if (cmd != kSaveLoad_Save) {
|
||||||
FILE *f = fopen(name, "rb");
|
FILE *f = fopen(name, "rb");
|
||||||
|
if (f == NULL) {
|
||||||
|
printf("Failed fopen: %s\n", name);
|
||||||
|
return;
|
||||||
|
}
|
||||||
RtlApuLock();
|
RtlApuLock();
|
||||||
StateRecorder_Load(&state_recorder, f, cmd == kSaveLoad_Replay);
|
StateRecorder_Load(&state_recorder, f, cmd == kSaveLoad_Replay);
|
||||||
ppu_copy(g_snes->my_ppu, g_snes->ppu);
|
ppu_copy(g_snes->my_ppu, g_snes->ppu);
|
||||||
|
|||||||
Reference in New Issue
Block a user