Skip to content

Commit

Permalink
win32: remove file association on startup, give a new menu item for i…
Browse files Browse the repository at this point in the history
…t instead
  • Loading branch information
gocha committed Aug 27, 2012
1 parent 4fad470 commit b7b749a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
3 changes: 2 additions & 1 deletion win32/rsrc/resource.h
Expand Up @@ -555,6 +555,7 @@
#define ID_WINDOW_SIZE_4X 40172
#define ID_DEBUG_APU_TRACE 40173
#define ID_EMULATION_BACKGROUNDINPUT 40174
#define ID_FILE_ASSOCIATION 40175
#define RAMMENU_FILE_AUTOLOAD 45000
#define RAMMENU_FILE_SAVEWINDOW 45001
#define RAMMENU_FILE_SAVE 45002
Expand All @@ -574,7 +575,7 @@
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 151
#define _APS_NEXT_COMMAND_VALUE 40175
#define _APS_NEXT_COMMAND_VALUE 40176
#define _APS_NEXT_CONTROL_VALUE 3019
#define _APS_NEXT_SYMED_VALUE 101
#endif
Expand Down
1 change: 1 addition & 0 deletions win32/rsrc/snes9x.rc
Expand Up @@ -1003,6 +1003,7 @@ BEGIN
MENUITEM "Sa&ve S-RAM Data", ID_FILE_SAVE_SRAM_DATA
END
MENUITEM "ROM Information...", IDM_ROM_INFO
MENUITEM "File Association...", ID_FILE_ASSOCIATION
MENUITEM SEPARATOR
MENUITEM "Movie Play...", ID_FILE_MOVIE_PLAY
MENUITEM "Movie Record...", ID_FILE_MOVIE_RECORD
Expand Down
11 changes: 9 additions & 2 deletions win32/wsnes9x.cpp
Expand Up @@ -655,6 +655,8 @@ void WinSetDefaultValues ();
void WinLockConfigFile ();
void WinUnlockConfigFile ();
void WinCleanupConfigData ();
bool RegisterProgid();
void RegisterExts();

#include "../ppu.h"
#include "../snapshot.h"
Expand Down Expand Up @@ -2515,6 +2517,13 @@ LRESULT CALLBACK WinProc(
DialogBox(g_hInst, MAKEINTRESOURCE(IDD_ROM_INFO), hWnd, DlgInfoProc);
RestoreSNESDisplay ();
break;
case ID_FILE_ASSOCIATION:
if (MessageBox(GUI.hWnd, TEXT("Do you want to associate extensions with Snes9x?"), SNES9X_INFO, MB_YESNO | MB_ICONQUESTION) == IDYES)
{
RegisterProgid();
RegisterExts();
}
break;
default:
if ((wParam & 0xffff) >= 0xFF00)
{
Expand Down Expand Up @@ -7007,8 +7016,6 @@ void LoadExts(void)
curr=valid_ext;
valid_ext=valid_ext->next;
delete curr;
RegisterProgid();
RegisterExts();
}

void MakeExtFile(void)
Expand Down

0 comments on commit b7b749a

Please sign in to comment.