Skip to content

Instantly share code, notes, and snippets.

@exjam
Created September 11, 2017 11:55
Show Gist options
  • Save exjam/126aeaa2b35cf6cb9dc9cef50a389fa7 to your computer and use it in GitHub Desktop.
Save exjam/126aeaa2b35cf6cb9dc9cef50a389fa7 to your computer and use it in GitHub Desktop.
#include "ppcutils/stackobject.h"
...
IMError
IMStartAPDVideoMode()
{
ppcutils::StackObject<be_val<uint32_t>> previous;
auto result = IM_GetNvParameterWithoutHandleAndItb(IMParameter::APDPeriod, previous);
if (result != IMError::OK) {
return result;
}
if (*previous == 14400) {
return IMError::OK;
}
return IM_SetRuntimeParameter(IMParameter::APDPeriod, 14400);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment