Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for HD cams. #1344

Open
wants to merge 39 commits into
base: master
Choose a base branch
from
Open

Conversation

mlgthatsme
Copy link
Member

No description provided.

@@ -20,6 +20,8 @@ void DirectX9Renderer::Destroy()

bool DirectX9Renderer::Create(TWindowHandleType window)
{
rendererType = Renderers::DirectX9;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't used anywhere

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how are we supposed to tell what renderer the user would be using? how would you approach that?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use polymorphic calls to abstract it out - e.g Create is a virtual call so DirectX9Renderer::Create know its the directx impl. If something outside of the object using the base type needs to know this then its probably leaking implementation details.

But its not even used currently so its dead code anyway.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

alright. done.

@@ -180,4 +182,8 @@ void DirectX9Renderer::Upload(BitDepth /*bitDepth*/, const PSX_RECT& /*rect*/, c
{
}

void DirectX9Renderer::LoadCustomCAM(const char* /*path*/, const unsigned char* /*key*/, int /*keyLength*/)
{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should prob log it isn't implemented with LOG_WARNING

@@ -231,3 +232,8 @@ void SoftwareRenderer::Upload(BitDepth bitDepth, const PSX_RECT& rect, const u8*
break;
}
}

void SoftwareRenderer::LoadCustomCAM(const char* /*path*/, const unsigned char* /*key*/, int /*keyLength*/)
{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should prob log it isn't implemented with LOG_WARNING

@@ -463,6 +467,15 @@ void ScreenManager::DecompressCameraToVRam_40EF60(u16** ppBits)
UnsetDirtyBits_40EDE0(1);
UnsetDirtyBits_40EDE0(2);
UnsetDirtyBits_40EDE0(3);

static char camName[12] = {};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

redundant static

@@ -59,6 +62,8 @@ class IRenderer

virtual void Upload(BitDepth bitDepth, const PSX_RECT& rect, const u8* pPixels) = 0;

virtual void LoadCustomCAM(const char* path, const unsigned char* key, int keyLength) = 0;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't "Custom" really be "External" or something "custom" and "data" is super generic name

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah fair

@mouzedrift
Copy link
Member

just for tracking purpose - hd cams dont work on some specific hardware (intel hd graphics 4600 in my case)
image

@mlgthatsme
Copy link
Member Author

just for tracking purpose - hd cams dont work on some specific hardware (intel hd graphics 4600 in my case) image

just fixed this, will commit now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants