The recent ROM names are now compacted using PathCompactPath, instead of being cut to 128 characters.
This commit is contained in:
parent
5a940dc2be
commit
3ed852c240
|
@ -1,7 +1,7 @@
|
||||||
<?xml version="1.0" encoding="shift_jis"?>
|
<?xml version="1.0" encoding="shift_jis"?>
|
||||||
<VisualStudioProject
|
<VisualStudioProject
|
||||||
ProjectType="Visual C++"
|
ProjectType="Visual C++"
|
||||||
Version="9.00"
|
Version="9,00"
|
||||||
Name="DeSmuME_VS2008"
|
Name="DeSmuME_VS2008"
|
||||||
ProjectGUID="{9F5F72A1-D3A5-4918-B460-E076B16D10A9}"
|
ProjectGUID="{9F5F72A1-D3A5-4918-B460-E076B16D10A9}"
|
||||||
RootNamespace="DeSmuME"
|
RootNamespace="DeSmuME"
|
||||||
|
@ -163,7 +163,7 @@
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCLinkerTool"
|
Name="VCLinkerTool"
|
||||||
AdditionalDependencies="vfw32.lib winmm.lib comctl32.lib opengl32.lib glu32.lib ws2_32.lib user32.lib gdi32.lib directx\dxguid.lib shell32.lib comdlg32.lib directx\dxerr8.lib directx\dsound.lib directx\dinput8.lib directx\ddraw.lib zlib-2008-x32.lib zziplib-2008-x32.lib"
|
AdditionalDependencies="vfw32.lib winmm.lib comctl32.lib opengl32.lib glu32.lib ws2_32.lib user32.lib gdi32.lib directx\dxguid.lib shell32.lib comdlg32.lib shlwapi.lib directx\dxerr8.lib directx\dsound.lib directx\dinput8.lib directx\ddraw.lib zlib-2008-x32.lib zziplib-2008-x32.lib"
|
||||||
OutputFile="$(OutDir)\$(ProjectName)_sse2.exe"
|
OutputFile="$(OutDir)\$(ProjectName)_sse2.exe"
|
||||||
AdditionalLibraryDirectories=".\zlib123;.\zziplib"
|
AdditionalLibraryDirectories=".\zlib123;.\zziplib"
|
||||||
GenerateDebugInformation="true"
|
GenerateDebugInformation="true"
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
#include "windriver.h"
|
#include "windriver.h"
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <shellapi.h>
|
#include <shellapi.h>
|
||||||
|
#include <shlwapi.h>
|
||||||
#include <Winuser.h>
|
#include <Winuser.h>
|
||||||
#include <commctrl.h>
|
#include <commctrl.h>
|
||||||
#include <commdlg.h>
|
#include <commdlg.h>
|
||||||
|
@ -548,35 +549,16 @@ void UpdateRecentRomsMenu()
|
||||||
EnableMenuItem(GetSubMenu(recentromsmenu, 0), clearid, MF_ENABLED);
|
EnableMenuItem(GetSubMenu(recentromsmenu, 0), clearid, MF_ENABLED);
|
||||||
DeleteMenu(GetSubMenu(recentromsmenu, 0), baseid, MF_BYCOMMAND);
|
DeleteMenu(GetSubMenu(recentromsmenu, 0), baseid, MF_BYCOMMAND);
|
||||||
|
|
||||||
/* If there's no ROM available, add a greyed "None" item */
|
HDC dc = GetDC(MainWindow->getHWnd());
|
||||||
/* Otherwise, let's fill the menu */
|
|
||||||
/* if (RecentRoms.size() == 0)
|
|
||||||
{
|
|
||||||
EnableMenuItem(GetSubMenu(recentromsmenu, 0), clearid, MF_GRAYED);
|
|
||||||
|
|
||||||
moo.cbSize = sizeof(moo);
|
|
||||||
moo.fMask = MIIM_DATA | MIIM_ID | MIIM_STATE | MIIM_TYPE;
|
|
||||||
|
|
||||||
moo.cch = 5;
|
|
||||||
moo.fType = 0;
|
|
||||||
moo.wID = 0;
|
|
||||||
moo.dwTypeData = "None";
|
|
||||||
moo.fState = MF_GRAYED;
|
|
||||||
|
|
||||||
InsertMenuItem(GetSubMenu(recentromsmenu, 0), 0, TRUE, &moo);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{*/
|
|
||||||
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------
|
//-----------------------------------------------------------------------
|
||||||
//Update the list using RecentRoms vector
|
//Update the list using RecentRoms vector
|
||||||
for(int x = RecentRoms.size()-1; x >= 0; x--) //Must loop in reverse order since InsertMenuItem will insert as the first on the list
|
for(int x = RecentRoms.size()-1; x >= 0; x--) //Must loop in reverse order since InsertMenuItem will insert as the first on the list
|
||||||
{
|
{
|
||||||
//Let's Limit the Displayed Rom name to 128 characters
|
|
||||||
string tmp = RecentRoms[x];
|
string tmp = RecentRoms[x];
|
||||||
if(tmp.size()>128)
|
LPSTR tmp2 = (LPSTR)tmp.c_str();
|
||||||
tmp = tmp.substr(0,128);
|
|
||||||
|
PathCompactPath(dc, tmp2, 500);
|
||||||
|
|
||||||
moo.cbSize = sizeof(moo);
|
moo.cbSize = sizeof(moo);
|
||||||
moo.fMask = MIIM_DATA | MIIM_ID | MIIM_TYPE;
|
moo.fMask = MIIM_DATA | MIIM_ID | MIIM_TYPE;
|
||||||
|
@ -584,10 +566,12 @@ void UpdateRecentRomsMenu()
|
||||||
moo.cch = tmp.size();
|
moo.cch = tmp.size();
|
||||||
moo.fType = 0;
|
moo.fType = 0;
|
||||||
moo.wID = baseid + x;
|
moo.wID = baseid + x;
|
||||||
moo.dwTypeData = (LPSTR)tmp.c_str();
|
moo.dwTypeData = tmp2;
|
||||||
//LOG("Inserting: %s\n",tmp.c_str()); //Debug
|
//LOG("Inserting: %s\n",tmp.c_str()); //Debug
|
||||||
InsertMenuItem(GetSubMenu(recentromsmenu, 0), 0, 1, &moo);
|
InsertMenuItem(GetSubMenu(recentromsmenu, 0), 0, 1, &moo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ReleaseDC(MainWindow->getHWnd(), dc);
|
||||||
//-----------------------------------------------------------------------
|
//-----------------------------------------------------------------------
|
||||||
|
|
||||||
HWND temp = MainWindow->getHWnd();
|
HWND temp = MainWindow->getHWnd();
|
||||||
|
|
Loading…
Reference in New Issue