Separated DirectX content from:

1) dll entry functions
2) Server (inside the dll)
3) Server-Client interface.

uMod now detects if a DirectX device was created and is under "control" of uMod (a counter is shown after the game name). Thus if the injection did not work properly, uMod wont show a DX9 or DX9EX count.
This commit is contained in:
code@koerner-de.net
2012-03-22 20:35:16 +00:00
parent 0c11963a9c
commit 56844968e4
52 changed files with 1329 additions and 1416 deletions
+26 -4
View File
@@ -60,6 +60,8 @@ BEGIN_EVENT_TABLE(uMod_Frame, wxFrame)
EVT_COMMAND (ID_Add_Game, uMod_EVENT_TYPE, uMod_Frame::OnAddGame)
EVT_COMMAND (ID_Delete_Game, uMod_EVENT_TYPE, uMod_Frame::OnDeleteGame)
EVT_COMMAND (ID_Add_Device, uMod_EVENT_TYPE, uMod_Frame::OnAddDevice)
EVT_COMMAND (ID_Delete_Device, uMod_EVENT_TYPE, uMod_Frame::OnRemoveDevice)
END_EVENT_TABLE()
IMPLEMENT_APP(MyApp)
@@ -260,10 +262,7 @@ void uMod_Frame::OnAddGame( wxCommandEvent &event)
delete page;
return;
}
name = name.AfterLast('\\');
name = name.AfterLast('/');
name = name.BeforeLast('.');
Notebook->AddPage( page, name, true);
Notebook->AddPage( page, page->GetPageName(), true);
Clients[NumberOfGames] = client;
NumberOfGames++;
@@ -286,6 +285,29 @@ void uMod_Frame::OnDeleteGame( wxCommandEvent &event)
}
}
void uMod_Frame::OnAddDevice( wxCommandEvent &event)
{
uMod_Client *client = ((uMod_Event&)event).GetClient();
for (int i=0; i<NumberOfGames; i++) if (Clients[i]==client)
{
uMod_GamePage *page = (uMod_GamePage*) Notebook->GetPage(i);
page->AddDXDevice(((uMod_Event&)event).GetValue());
Notebook->SetPageText( i, page->GetPageName());
return;
}
}
void uMod_Frame::OnRemoveDevice( wxCommandEvent &event)
{
uMod_Client *client = ((uMod_Event&)event).GetClient();
for (int i=0; i<NumberOfGames; i++) if (Clients[i]==client)
{
uMod_GamePage *page = (uMod_GamePage*) Notebook->GetPage(i);
page->RemoveDXDevice(((uMod_Event&)event).GetValue());
Notebook->SetPageText( i, page->GetPageName());
return;
}
}
void uMod_Frame::OnClose(wxCloseEvent& event)
{