comparison src/main.c @ 2:712c7fd6702a

Remove a LOT of unneeded stuff
author Paper <mrpapersonic@gmail.com>
date Sun, 07 Aug 2022 10:41:55 -0400
parents 7abb5d8b20ea
children 59bf702b2b21
comparison
equal deleted inserted replaced
1:7abb5d8b20ea 2:712c7fd6702a
1 #include <assert.h> 1 #include <assert.h>
2 #include <stdio.h> 2 #include <stdio.h>
3 #include <stdint.h>
4 #include <stdlib.h> 3 #include <stdlib.h>
5 #include <time.h>
6 #include <Winamp/wa_ipc.h> 4 #include <Winamp/wa_ipc.h>
7 #include "main.h" 5 #include "main.h"
8 #include "discord_game_sdk.h" 6 #include "discord_game_sdk.h"
9 #include "timer.h" 7 #include "timer.h"
10 #include "config.h" 8 #include "config.h"
11 #include "dirtools.h"
12 #include "resource.h" 9 #include "resource.h"
13 #ifndef WIN32_LEAN_AND_MEAN 10 #ifndef WIN32_LEAN_AND_MEAN
14 # define WIN32_LEAN_AND_MEAN 11 # define WIN32_LEAN_AND_MEAN
15 #endif 12 #endif
16 #include <windows.h> 13 #include <windows.h>
122 119
123 return CallWindowProc(g_lpWndProcOld, hwnd, message, wParam, lParam); 120 return CallWindowProc(g_lpWndProcOld, hwnd, message, wParam, lParam);
124 } 121 }
125 122
126 int init() { 123 int init() {
127 char* path = dirtools_concat_paths(getenv("APPDATA"), "Winamp\\Plugins\\wgsdk");
128 printf("%s", path);
129 memset(&app, 0, sizeof(app)); 124 memset(&app, 0, sizeof(app));
130 if (IsWindowUnicode(g_plugin.hwndParent)) { 125 if (IsWindowUnicode(g_plugin.hwndParent)) {
131 g_lpWndProcOld = (WNDPROC)SetWindowLongW(g_plugin.hwndParent, -4, (LONG)WndProc); 126 g_lpWndProcOld = (WNDPROC)SetWindowLongW(g_plugin.hwndParent, -4, (LONG)WndProc);
132 } else { 127 } else {
133 g_lpWndProcOld = (WNDPROC)SetWindowLongA(g_plugin.hwndParent, -4, (LONG)WndProc); 128 g_lpWndProcOld = (WNDPROC)SetWindowLongA(g_plugin.hwndParent, -4, (LONG)WndProc);