summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@mplayer2.org>2012-04-14 16:53:24 +0200
committerwm4 <wm4@mplayer2.org>2012-04-14 17:03:11 +0200
commit3bb456b14d4c2b8e26c5d6f7bbfe62f5e97ed58e (patch)
treed1632f83582bd3d0211f9bc772a275aca16cfb1b
parent923f353d2ab9fa24d3a3989c23cec88499068b77 (diff)
downloadmpv-3bb456b14d4c2b8e26c5d6f7bbfe62f5e97ed58e.tar.bz2
mpv-3bb456b14d4c2b8e26c5d6f7bbfe62f5e97ed58e.tar.xz
win32: simplify icon loading
I have no idea why the code used this roundabout method. Also detab mplayer.rc.
-rw-r--r--libvo/w32_common.c7
-rw-r--r--osdep/mplayer.rc6
2 files changed, 4 insertions, 9 deletions
diff --git a/libvo/w32_common.c b/libvo/w32_common.c
index f6ebe10b81..7eaafe7c29 100644
--- a/libvo/w32_common.c
+++ b/libvo/w32_common.c
@@ -631,12 +631,7 @@ int vo_w32_init(struct vo *vo)
HINSTANCE hInstance = GetModuleHandleW(NULL);
- HICON mplayerIcon = 0;
- wchar_t exedir[MAX_PATH];
- if (GetModuleFileNameW(0, exedir, MAX_PATH))
- mplayerIcon = ExtractIconW(hInstance, exedir, 0);
- if (!mplayerIcon)
- mplayerIcon = LoadIcon(0, IDI_APPLICATION);
+ HICON mplayerIcon = LoadIconW(hInstance, L"IDI_ICON1");
WNDCLASSEXW wcex = {
.cbSize = sizeof wcex,
diff --git a/osdep/mplayer.rc b/osdep/mplayer.rc
index fe68aa2175..fe70aa871f 100644
--- a/osdep/mplayer.rc
+++ b/osdep/mplayer.rc
@@ -29,9 +29,9 @@ FILETYPE VFT_APP
{
BLOCK "StringFileInfo"
{
- BLOCK "000004b0" // LANG_NEUTRAL,UNICODE_CP
+ BLOCK "000004b0" // LANG_NEUTRAL,UNICODE_CP
{
- VALUE "Comments","mplayer2 is distributed under the terms of the GNU General Public License Version 3. Source code is available at http://www.mplayer2.org\000"
+ VALUE "Comments","mplayer2 is distributed under the terms of the GNU General Public License Version 3. Source code is available at http://www.mplayer2.org\000"
VALUE "CompanyName", "\000"
VALUE "FileDescription", "mplayer2 - Movie Player\000"
VALUE "FileVersion",VERSION
@@ -45,7 +45,7 @@ FILETYPE VFT_APP
}
BLOCK "VarFileInfo"
{
- VALUE "Translation",0,0x04b0
+ VALUE "Translation",0,0x04b0
}
}