fixed version stuff

made it so new items insert front-most instead of back-most
master
jp9000 2013-02-05 02:06:08 -07:00
parent 6dfdfbf088
commit d57785dbc6
8 changed files with 40 additions and 13 deletions

10
INSTALL
View File

@ -16,6 +16,14 @@ individually yourself. x264 and libmp3lame are pre-compiled for
convenience.
---------------------------------------------
Windows SDK
---------------------------------------------
It requires the latest windows SDK, as it uses features from
windows vista, windows 7 and 8. The windows 8 SDK should also come
with the latest DirectX includes and libraries
---------------------------------------------
Compiling LAME (if desired)
---------------------------------------------
@ -44,7 +52,7 @@ though I suppose you could make it use posix threads with a bit of work,
but it's fairly pointless and you'd probably have to add some more stuff
to the Hacks.cpp file.
If compiling static (which is what I usually do), please make sure to
If compiling static (which I don't do anymore), please make sure to
include the static libgcc.a that your mingw provides. Depending on your
mingw version you may need to add/remove stuff from Hacks.cpp to get it
properly working. It sucks, I know, but I'm not the one who decided to

8
OBS.rc
View File

@ -652,8 +652,8 @@ END
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 0,4,6,6
PRODUCTVERSION 0,4,6,6
FILEVERSION 0,4,7,0
PRODUCTVERSION 0,4,7,0
FILEFLAGSMASK 0x17L
#ifdef _DEBUG
FILEFLAGS 0x1L
@ -669,12 +669,12 @@ BEGIN
BLOCK "041104b0"
BEGIN
VALUE "FileDescription", "Open Broadcaster Software"
VALUE "FileVersion", "0, 4, 6, 6"
VALUE "FileVersion", "0, 4, 7, 0"
VALUE "InternalName", "OBS"
VALUE "LegalCopyright", "Copyright (C) 2012"
VALUE "OriginalFilename", "OBS.exe"
VALUE "ProductName", "Open Broadcaster Software"
VALUE "ProductVersion", "0, 4, 6, 6"
VALUE "ProductVersion", "0, 4, 7, 0"
END
END
BLOCK "VarFileInfo"

View File

@ -417,6 +417,20 @@ XElement* XElement::CreateElement(CTSTR lpName)
return newElement;
}
XElement* XElement::InsertElement(UINT pos, CTSTR lpName)
{
assert(lpName);
XElement *newElement = new XElement(file, this, lpName);
if(pos > SubItems.Num())
pos = SubItems.Num();
SubItems.Insert(pos, newElement);
return newElement;
}
void XElement::GetElementList(CTSTR lpName, List<XElement*> &Elements) const
{
Elements.Clear();

View File

@ -168,6 +168,7 @@ public:
XElement* GetElementByID(DWORD elementID) const;
XElement* GetElementByItem(CTSTR lpName, CTSTR lpItemName, CTSTR lpItemValue) const;
XElement* CreateElement(CTSTR lpName);
XElement* InsertElement(UINT pos, CTSTR lpName);
void GetElementList(CTSTR lpName, List<XElement*> &Elements) const;
void RemoveElement(XElement *element);
void RemoveElement(CTSTR lpName);

View File

@ -167,7 +167,7 @@ void OBS::AddSourceItem(LPWSTR name, bool checked, UINT index)
HWND hwndSources = GetDlgItem(hwndMain, ID_SOURCES);
ListView_InsertItem(hwndSources, &lvI);
ListView_SetCheckState(hwndSources, index, checked);
ListView_SetColumnWidth(hwndSources, 0, LVSCW_AUTOSIZE_USEHEADER);

View File

@ -582,7 +582,7 @@ INT_PTR CALLBACK OBS::PublishSettingsProc(HWND hwnd, UINT message, WPARAM wParam
//--------------------------------------------
hwndTemp = GetDlgItem(hwnd, IDC_SERVICE);
int itemId = SendMessage(hwndTemp, CB_ADDSTRING, 0, (LPARAM)TEXT("Custom"));
int itemId = (int)SendMessage(hwndTemp, CB_ADDSTRING, 0, (LPARAM)TEXT("Custom"));
SendMessage(hwndTemp, CB_SETITEMDATA, itemId, 0);
UINT numServices = 0;
@ -598,7 +598,7 @@ INT_PTR CALLBACK OBS::PublishSettingsProc(HWND hwnd, UINT message, WPARAM wParam
for(UINT i=0; i<numServices; i++)
{
XElement *service = services->GetElementByID(i);
itemId = SendMessage(hwndTemp, CB_ADDSTRING, 0, (LPARAM)service->GetName());
itemId = (int)SendMessage(hwndTemp, CB_ADDSTRING, 0, (LPARAM)service->GetName());
SendMessage(hwndTemp, CB_SETITEMDATA, itemId, service->GetInt(TEXT("id")));
}
}

View File

@ -683,7 +683,7 @@ LRESULT CALLBACK OBS::ListboxHook(HWND hwnd, UINT message, WPARAM wParam, LPARAM
XElement *sources = curSceneElement->GetElement(TEXT("sources"));
if(!sources)
sources = curSceneElement->CreateElement(TEXT("sources"));
XElement *newSourceElement = sources->CreateElement(strName);
XElement *newSourceElement = sources->InsertElement(0, strName);
newSourceElement->SetInt(TEXT("render"), 1);
if(ret >= ID_LISTBOX_GLOBALSOURCE)
@ -741,14 +741,14 @@ LRESULT CALLBACK OBS::ListboxHook(HWND hwnd, UINT message, WPARAM wParam, LPARAM
ListView_SetItemCount(hwnd, numSources);
App->bChangingSources = true;
App->AddSourceItem((LPWSTR) strName.Array(), true, numSources - 1);
App->AddSourceItem((LPWSTR) strName.Array(), true, 0);
App->bChangingSources = false;
SetFocus(hwnd);
// make sure the added item is visible and selected/focused
ListView_EnsureVisible(hwnd, numSources - 1, false);
ListView_SetItemState(hwnd, numSources - 1, LVIS_SELECTED|LVIS_FOCUSED, LVIS_SELECTED|LVIS_FOCUSED);
ListView_EnsureVisible(hwnd, 0, false);
ListView_SetItemState(hwnd, 0, LVIS_SELECTED|LVIS_FOCUSED, LVIS_SELECTED|LVIS_FOCUSED);
App->ReportSourcesAddedOrRemoved();
}
}

View File

@ -2,7 +2,7 @@
; Define your application name
!define APPNAME "Open Broadcaster Software"
!define APPNAMEANDVERSION "Open Broadcaster Software 0.465a"
!define APPNAMEANDVERSION "Open Broadcaster Software 0.47a"
; Additional script dependencies
!include WinVer.nsh
@ -106,6 +106,7 @@ Section "Open Broadcaster Software" Section1
; Set Section Files and Shortcuts
SetOutPath "$INSTDIR\"
File "..\Release\OBS.exe"
File "..\x264\libs\32bit\libx264-129.dll"
File "..\OBSAPI\Release\OBSApi.dll"
File "..\rundir\services.xconfig"
File "..\rundir\OBSHelp.chm"
@ -126,6 +127,7 @@ Section "Open Broadcaster Software" Section1
${if} ${RunningX64}
SetOutPath "$INSTDIR\64bit\"
File "..\x64\Release\OBS.exe"
File "..\x264\libs\64bit\libx264-129.dll"
File "..\OBSAPI\x64\Release\OBSApi.dll"
File "..\rundir\services.xconfig"
File "..\rundir\OBSHelp.chm"
@ -191,6 +193,7 @@ Section Uninstall
; Clean up Open Broadcaster Software
Delete "$INSTDIR\OBS.exe"
Delete "$INSTDIR\libx264-129.dll"
Delete "$INSTDIR\OBSApi.dll"
Delete "$INSTDIR\services.xconfig"
Delete "$INSTDIR\*.chm"
@ -204,6 +207,7 @@ Section Uninstall
Delete "$INSTDIR\plugins\GraphicsCapture\GraphicsCaptureHook.dll"
${if} ${RunningX64}
Delete "$INSTDIR\64bit\OBS.exe"
Delete "$INSTDIR\64bit\libx264-129.dll"
Delete "$INSTDIR\64bit\OBSApi.dll"
Delete "$INSTDIR\64bit\services.xconfig"
Delete "$INSTDIR\64bit\*.chm"