annotate src/main.c @ 6:8ce85aee15c0

update tags
author convert-repo
date Sat, 17 Dec 2022 01:48:13 +0000
parents 59bf702b2b21
children be4835547dd0
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
1 #include <assert.h>
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
2 #include <stdio.h>
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
3 #include <stdlib.h>
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
4 #include <Winamp/wa_ipc.h>
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
5 #include "main.h"
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
6 #include "discord_game_sdk.h"
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
7 #include "timer.h"
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
8 #include "config.h"
1
7abb5d8b20ea Initial commit: part 2
Paper <mrpapersonic@gmail.com>
parents: 0
diff changeset
9 #include "resource.h"
0
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
10 #ifndef WIN32_LEAN_AND_MEAN
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
11 # define WIN32_LEAN_AND_MEAN
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
12 #endif
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
13 #include <windows.h>
1
7abb5d8b20ea Initial commit: part 2
Paper <mrpapersonic@gmail.com>
parents: 0
diff changeset
14 #include <windowsx.h>
0
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
15
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
16 #define CLIENT_ID 969367220599803955
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
17 #define DISCORD_REQUIRE(x) \
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
18 assert(x == DiscordResult_Ok)
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
19
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
20 #define GPPHDR_VER 0x10
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
21
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
22 winamp_general_purpose_plugin g_plugin = {
1
7abb5d8b20ea Initial commit: part 2
Paper <mrpapersonic@gmail.com>
parents: 0
diff changeset
23 GPPHDR_VER, // version of the plugin, defined in "gen_myplugin.h"
7abb5d8b20ea Initial commit: part 2
Paper <mrpapersonic@gmail.com>
parents: 0
diff changeset
24 "Discord GameSDK", // name/title of the plugin, defined in "gen_myplugin.h"
7abb5d8b20ea Initial commit: part 2
Paper <mrpapersonic@gmail.com>
parents: 0
diff changeset
25 init, // function name which will be executed on init event
7abb5d8b20ea Initial commit: part 2
Paper <mrpapersonic@gmail.com>
parents: 0
diff changeset
26 conf, // function name which will be executed on config event
7abb5d8b20ea Initial commit: part 2
Paper <mrpapersonic@gmail.com>
parents: 0
diff changeset
27 quit, // function name which will be executed on quit event
7abb5d8b20ea Initial commit: part 2
Paper <mrpapersonic@gmail.com>
parents: 0
diff changeset
28 0, // handle to Winamp main window, loaded by winamp when this dll is loaded
7abb5d8b20ea Initial commit: part 2
Paper <mrpapersonic@gmail.com>
parents: 0
diff changeset
29 0 // hinstance to this dll, loaded by winamp when this dll is loaded
0
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
30 };
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
31
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
32 WNDPROC g_lpWndProcOld = 0;
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
33
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
34 struct timer_t timer_callbacks = { .interval = 16 };
4
59bf702b2b21 *: stylistic changes
Paper <mrpapersonic@gmail.com>
parents: 2
diff changeset
35 struct config config = {
0
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
36 .display_title = 1,
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
37 .show_elapsed_time = 1
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
38 };
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
39
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
40 struct DiscordActivity activity = {
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
41 .application_id = CLIENT_ID,
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
42 .name = "Winamp",
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
43 .instance = 0
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
44 };
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
45
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
46 struct IDiscordActivityEvents activities_events;
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
47
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
48 struct app_t app;
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
49
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
50 void update_activity_callback(void* data, enum EDiscordResult result)
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
51 {
1
7abb5d8b20ea Initial commit: part 2
Paper <mrpapersonic@gmail.com>
parents: 0
diff changeset
52 DISCORD_REQUIRE(result);
0
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
53 }
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
54
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
55 void report_current_song_status(int playbackState)
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
56 {
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
57 assert(playbackState != 0);
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
58 activity.timestamps.start = 0;
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
59 strcpy(activity.state, playbackState == 1 ? "(Playing)" : "(Paused)");
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
60
1
7abb5d8b20ea Initial commit: part 2
Paper <mrpapersonic@gmail.com>
parents: 0
diff changeset
61 if (playbackState == 1 && config.show_elapsed_time) {
0
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
62 FILETIME ft;
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
63 GetSystemTimeAsFileTime(&ft);
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
64 ULARGE_INTEGER ul;
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
65 ul.LowPart = ft.dwLowDateTime;
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
66 ul.HighPart = ft.dwHighDateTime;
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
67 long long dtn = ((ul.QuadPart - 116444736000000000ULL)/10000000);
1
7abb5d8b20ea Initial commit: part 2
Paper <mrpapersonic@gmail.com>
parents: 0
diff changeset
68
0
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
69 activity.timestamps.start = dtn - SendMessage(g_plugin.hwndParent, WM_WA_IPC, 0, IPC_GETOUTPUTTIME) / 1000;
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
70 } else {
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
71 activity.timestamps.start = 0;
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
72 }
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
73
4
59bf702b2b21 *: stylistic changes
Paper <mrpapersonic@gmail.com>
parents: 2
diff changeset
74 char* details_message = calloc(256, sizeof(char));
1
7abb5d8b20ea Initial commit: part 2
Paper <mrpapersonic@gmail.com>
parents: 0
diff changeset
75 if (config.display_title) {
0
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
76 wchar_t* title = (wchar_t*)SendMessageW(g_plugin.hwndParent, WM_WA_IPC, 0, IPC_GET_PLAYING_TITLE);
4
59bf702b2b21 *: stylistic changes
Paper <mrpapersonic@gmail.com>
parents: 2
diff changeset
77 assert(WideCharToMultiByte(CP_UTF8, WC_ERR_INVALID_CHARS, title, -1, details_message, 256, NULL, NULL));
59bf702b2b21 *: stylistic changes
Paper <mrpapersonic@gmail.com>
parents: 2
diff changeset
78 free(title);
1
7abb5d8b20ea Initial commit: part 2
Paper <mrpapersonic@gmail.com>
parents: 0
diff changeset
79 }
4
59bf702b2b21 *: stylistic changes
Paper <mrpapersonic@gmail.com>
parents: 2
diff changeset
80 strcpy(activity.details, details_message);
59bf702b2b21 *: stylistic changes
Paper <mrpapersonic@gmail.com>
parents: 2
diff changeset
81 free(details_message);
0
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
82
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
83 app.activities->update_activity(app.activities, &activity, &app, update_activity_callback);
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
84 }
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
85
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
86 void report_idle_status(void)
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
87 {
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
88 activity.timestamps.start = 0;
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
89 strcpy(activity.state, "(Idle)");
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
90
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
91 app.activities->update_activity(app.activities, &activity, &app, update_activity_callback);
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
92 }
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
93
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
94 void update_rich_presence_details(void)
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
95 {
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
96 LONG isPlayingResult = SendMessageW(g_plugin.hwndParent, WM_WA_IPC, 0, IPC_ISPLAYING);
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
97
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
98 switch (isPlayingResult) {
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
99 case 0:
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
100 report_idle_status();
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
101 break;
4
59bf702b2b21 *: stylistic changes
Paper <mrpapersonic@gmail.com>
parents: 2
diff changeset
102 case 1:
59bf702b2b21 *: stylistic changes
Paper <mrpapersonic@gmail.com>
parents: 2
diff changeset
103 case 3:
59bf702b2b21 *: stylistic changes
Paper <mrpapersonic@gmail.com>
parents: 2
diff changeset
104 report_current_song_status(isPlayingResult);
59bf702b2b21 *: stylistic changes
Paper <mrpapersonic@gmail.com>
parents: 2
diff changeset
105 default:
59bf702b2b21 *: stylistic changes
Paper <mrpapersonic@gmail.com>
parents: 2
diff changeset
106 break;
0
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
107 }
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
108 }
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
109
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
110 LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
111 {
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
112 if (message == WM_WA_IPC && lParam == IPC_CB_MISC && wParam == IPC_CB_MISC_STATUS)
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
113 {
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
114 update_rich_presence_details();
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
115 }
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
116
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
117 return CallWindowProc(g_lpWndProcOld, hwnd, message, wParam, lParam);
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
118 }
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
119
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
120 int init() {
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
121 memset(&app, 0, sizeof(app));
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
122 if (IsWindowUnicode(g_plugin.hwndParent)) {
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
123 g_lpWndProcOld = (WNDPROC)SetWindowLongW(g_plugin.hwndParent, -4, (LONG)WndProc);
1
7abb5d8b20ea Initial commit: part 2
Paper <mrpapersonic@gmail.com>
parents: 0
diff changeset
124 } else {
0
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
125 g_lpWndProcOld = (WNDPROC)SetWindowLongA(g_plugin.hwndParent, -4, (LONG)WndProc);
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
126 }
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
127
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
128 memset(&activity, 0, sizeof(activity));
1
7abb5d8b20ea Initial commit: part 2
Paper <mrpapersonic@gmail.com>
parents: 0
diff changeset
129 memset(&activities_events, 0, sizeof(activities_events));
0
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
130
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
131 struct DiscordCreateParams params;
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
132 DiscordCreateParamsSetDefault(&params);
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
133 params.client_id = CLIENT_ID;
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
134 params.flags = DiscordCreateFlags_Default;
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
135 params.event_data = &app;
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
136 params.activity_events = &activities_events;
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
137
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
138 DISCORD_REQUIRE(DiscordCreate(DISCORD_VERSION, &params, &app.core));
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
139
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
140 app.activities = app.core->get_activity_manager(app.core);
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
141
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
142 timer_init(&timer_callbacks, g_plugin.hwndParent, TimerProc);
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
143 timer_set(&timer_callbacks, g_plugin.hwndParent);
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
144
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
145 cfg_load(&config);
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
146
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
147 strcpy(activity.assets.large_image, "winamp-logo");
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
148
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
149 update_rich_presence_details();
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
150
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
151 return 0;
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
152 }
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
153
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
154 void quit() {
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
155 assert(!cfg_save(config));
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
156 app.activities->clear_activity(app.activities, &app, update_activity_callback);
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
157 }
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
158
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
159 void CALLBACK TimerProc(HWND, UINT, UINT_PTR, DWORD) {
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
160 DISCORD_REQUIRE(app.core->run_callbacks(app.core));
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
161 }
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
162
1
7abb5d8b20ea Initial commit: part 2
Paper <mrpapersonic@gmail.com>
parents: 0
diff changeset
163 void conf() {
4
59bf702b2b21 *: stylistic changes
Paper <mrpapersonic@gmail.com>
parents: 2
diff changeset
164 DialogBoxW(g_plugin.hDllInstance, (LPWSTR)DIALOG_CONFIG, g_plugin.hwndParent, (DLGPROC)cfg_win_proc);
1
7abb5d8b20ea Initial commit: part 2
Paper <mrpapersonic@gmail.com>
parents: 0
diff changeset
165 }
7abb5d8b20ea Initial commit: part 2
Paper <mrpapersonic@gmail.com>
parents: 0
diff changeset
166
0
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
167 __declspec(dllexport) winamp_general_purpose_plugin* winampGetGeneralPurposePlugin() {
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
168 return &g_plugin;
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
169 }