Skip to content

Commit

Permalink
Isolated the about callback
Browse files Browse the repository at this point in the history
  • Loading branch information
Eric Hood committed Feb 23, 2021
1 parent 8bdde9c commit 4ccbf26
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
5 changes: 0 additions & 5 deletions About.h

This file was deleted.

2 changes: 1 addition & 1 deletion About.c → DialogBoxAboutCallback.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include "resources/resource.h"

// Mesage handler for the About box.
LRESULT CALLBACK About(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
LRESULT CALLBACK DialogBoxAboutCallback(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
VccState* vccState = GetVccState();

Expand Down
5 changes: 5 additions & 0 deletions DialogBoxAboutCallback.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#pragma once

#include <windows.h>

LRESULT CALLBACK DialogBoxAboutCallback(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
4 changes: 2 additions & 2 deletions Vcc.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="About.c" />
<ClCompile Include="DialogBoxAboutCallback.c" />
<ClCompile Include="CreateAudioConfigDialogCallback.c" />
<ClCompile Include="CreateBitBangerConfigDialogCallback.c" />
<ClCompile Include="CreateCpuConfigDialogCallback.c" />
Expand All @@ -192,7 +192,7 @@
<Text Include="README.md" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="About.h" />
<ClInclude Include="DialogBoxAboutCallback.h" />
<ClInclude Include="CreateAudioConfigDialogCallback.h" />
<ClInclude Include="CreateBitBangerConfigDialogCallback.h" />
<ClInclude Include="CreateCpuConfigDialogCallback.h" />
Expand Down
4 changes: 2 additions & 2 deletions main.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@
#include "library/fileoperations.h"
#include "library/Graphics.h"

#include "About.h"
#include "CreateDDWindow.h"
#include "EmuLoop.h"
#include "FullScreenToggle.h"
#include "InitInstance.h"
#include "LoadConfig.h"
#include "CreateMainConfigDialogCallback.h"
#include "DialogBoxAboutCallback.h"

LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam);

Expand Down Expand Up @@ -196,7 +196,7 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
switch (wmId)
{
case IDM_HELP_ABOUT:
DialogBox(vccState->EmuState.Resources, (LPCTSTR)IDD_ABOUTBOX, hWnd, (DLGPROC)About);
DialogBox(vccState->EmuState.Resources, (LPCTSTR)IDD_ABOUTBOX, hWnd, (DLGPROC)DialogBoxAboutCallback);
break;

case ID_CONFIGURE_OPTIONS:
Expand Down

0 comments on commit 4ccbf26

Please sign in to comment.