Browse Source

Pull of marten port of field of view improvements from Hoikas.

Merge commit 'b08521425bfbeff4c8a0a120d7fa5f27e0694bb6' into marten/Noikas-horplus-field-of-view
marten/Noikas-horplus-field-of-view
rarified 4 years ago
parent
commit
a212105067
  1. 14
      MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/Apps/plClient/plClient.cpp
  2. 10
      MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/PubUtilLib/plAudio/plVoiceChat.cpp
  3. 2
      MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/PubUtilLib/plPipeline/plCaptureRender.cpp

14
MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/Apps/plClient/plClient.cpp

@ -2265,8 +2265,6 @@ void plClient::IDetectAudioVideoSettings()
if(rec->GetG3DHALorHEL() == hsG3DDeviceSelector::kHHD3DRefDev) if(rec->GetG3DHALorHEL() == hsG3DDeviceSelector::kHHD3DRefDev)
refDevice = true; refDevice = true;
plPipeline::fDefaultPipeParams.Width = hsG3DDeviceSelector::kDefaultWidth;
plPipeline::fDefaultPipeParams.Height = hsG3DDeviceSelector::kDefaultHeight;
plPipeline::fDefaultPipeParams.ColorDepth = hsG3DDeviceSelector::kDefaultDepth; plPipeline::fDefaultPipeParams.ColorDepth = hsG3DDeviceSelector::kDefaultDepth;
#if defined(HS_DEBUGGING) || defined(DEBUG) #if defined(HS_DEBUGGING) || defined(DEBUG)
plPipeline::fDefaultPipeParams.Windowed = true; plPipeline::fDefaultPipeParams.Windowed = true;
@ -2274,6 +2272,18 @@ void plClient::IDetectAudioVideoSettings()
plPipeline::fDefaultPipeParams.Windowed = false; plPipeline::fDefaultPipeParams.Windowed = false;
#endif #endif
// Use current desktop resolution for fullscreen mode
if(!plPipeline::fDefaultPipeParams.Windowed)
{
plPipeline::fDefaultPipeParams.Width = GetSystemMetrics(SM_CXSCREEN);
plPipeline::fDefaultPipeParams.Height = GetSystemMetrics(SM_CYSCREEN);
}
else
{
plPipeline::fDefaultPipeParams.Width = hsG3DDeviceSelector::kDefaultWidth;
plPipeline::fDefaultPipeParams.Height = hsG3DDeviceSelector::kDefaultHeight;
}
plPipeline::fDefaultPipeParams.Shadows = 0; plPipeline::fDefaultPipeParams.Shadows = 0;
// enable shadows if TnL is available, meaning not an intel extreme. // enable shadows if TnL is available, meaning not an intel extreme.
if(rec->GetG3DHALorHEL() == hsG3DDeviceSelector::kHHD3DTnLHalDev) if(rec->GetG3DHALorHEL() == hsG3DDeviceSelector::kHHD3DTnLHalDev)

10
MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/PubUtilLib/plAudio/plVoiceChat.cpp

@ -86,7 +86,7 @@ plVoiceRecorder::plVoiceRecorder()
plPlateManager::Instance().CreatePlate( &fDisabledIcon ); plPlateManager::Instance().CreatePlate( &fDisabledIcon );
fDisabledIcon->CreateFromResource( MICROPHONE ); fDisabledIcon->CreateFromResource( MICROPHONE );
fDisabledIcon->SetPosition(-0.90, -0.90); fDisabledIcon->SetPosition(-0.90, -0.90);
fDisabledIcon->SetSize(0.0675, 0.09); fDisabledIcon->SetSize(0.064, 0.064, true);
fDisabledIcon->SetVisible(false); fDisabledIcon->SetVisible(false);
plPlateManager::Instance().CreatePlate( &fTalkIcon ); plPlateManager::Instance().CreatePlate( &fTalkIcon );
@ -210,14 +210,17 @@ void plVoiceRecorder::DrawDisabledIcon(hsBool b)
{ {
fDisabledIcon->CreateFromResource( MICROPHONE ); fDisabledIcon->CreateFromResource( MICROPHONE );
fDisabledIcon->SetPosition(-0.90, -0.90); fDisabledIcon->SetPosition(-0.90, -0.90);
fDisabledIcon->SetSize(0.0675, 0.09); fDisabledIcon->SetSize(0.064, 0.064, true);
fDisabledIcon->SetVisible(false); fDisabledIcon->SetVisible(false);
} }
} }
if (fDisabledIcon) if (fDisabledIcon)
{
fDisabledIcon->SetSize(0.064, 0.064, true); // Re-compute plate size in case the aspect ratio has changed.
fDisabledIcon->SetVisible(b); fDisabledIcon->SetVisible(b);
} }
}
void plVoiceRecorder::DrawTalkIcon(hsBool b) void plVoiceRecorder::DrawTalkIcon(hsBool b)
{ {
@ -227,13 +230,14 @@ void plVoiceRecorder::DrawTalkIcon(hsBool b)
if (fTalkIcon) if (fTalkIcon)
{ fTalkIcon->CreateFromResource( TALKING ); { fTalkIcon->CreateFromResource( TALKING );
fTalkIcon->SetPosition(-0.9,-0.9); fTalkIcon->SetPosition(-0.9,-0.9);
fTalkIcon->SetSize(0.0675, 0.09); fTalkIcon->SetSize(0.064, 0.064, true);
fTalkIcon->SetVisible(false); fTalkIcon->SetVisible(false);
} }
} }
if (fTalkIcon) if (fTalkIcon)
{ {
fTalkIcon->SetSize(0.064, 0.064, true); // Re-compute plate size in case the aspect ratio has changed.
fTalkIcon->SetVisible(b); fTalkIcon->SetVisible(b);
} }
} }

2
MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/PubUtilLib/plPipeline/plCaptureRender.cpp

@ -91,6 +91,7 @@ void plCaptureRenderRequest::Render(plPipeline* pipe, plPageTreeMgr* pageMgr)
SetClearDepth(1); SetClearDepth(1);
// render all GUI items // render all GUI items
pfGameGUIMgr::GetInstance()->SetAspectRatio((float)fRenderTarget->GetWidth() / (float)fRenderTarget->GetHeight());
std::vector<plPostEffectMod*> guiRenderMods = pfGameGUIMgr::GetInstance()->GetDlgRenderMods(); std::vector<plPostEffectMod*> guiRenderMods = pfGameGUIMgr::GetInstance()->GetDlgRenderMods();
for (int i = (int)guiRenderMods.size() - 1; i >= 0; i--) // render in reverse, so dialogs on the bottom get rendered first for (int i = (int)guiRenderMods.size() - 1; i >= 0; i--) // render in reverse, so dialogs on the bottom get rendered first
{ {
@ -104,6 +105,7 @@ void plCaptureRenderRequest::Render(plPipeline* pipe, plPageTreeMgr* pageMgr)
pipe->PopRenderRequest(this); pipe->PopRenderRequest(this);
} }
} }
pfGameGUIMgr::GetInstance()->SetAspectRatio((float)pipe->Width() / (float)pipe->Height());
// Callback on plCaptureRender to process the render target into a mipmap // Callback on plCaptureRender to process the render target into a mipmap
// and send it back to the requester. // and send it back to the requester.

Loading…
Cancel
Save