Skip to content

Conversation

@T-rvw
Copy link
Contributor

@T-rvw T-rvw commented Aug 5, 2023

@T-rvw T-rvw added the Draft DO NOT merge label Aug 5, 2023
@T-rvw T-rvw force-pushed the main branch 2 times, most recently from feb0da8 to fd37097 Compare September 18, 2023 17:56
Comment on lines 252 to +258
// Center the window
SDL_DisplayMode dm;
SDL_GetDesktopDisplayMode(0, &dm);
int screenWidth = dm.w;
int screenHeight = dm.h;
int windowX = (screenWidth - width) / 2;
int windowY = (screenHeight - height) / 2;
SDL_SetWindowPosition(m_pSDLWindow, windowX, windowY);
//const SDL_DisplayMode* dm = SDL_GetCurrentDisplayMode();
//int screenWidth = dm->w;
//int screenHeight = dm->h;
//int windowX = (screenWidth - width) / 2;
//int windowY = (screenHeight - height) / 2;
//SDL_SetWindowPosition(m_pSDLWindow, windowX, windowY);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

TODO

Comment on lines +265 to +303
//if (!pFilePath)
//{
// return;
//}
//
//std::string iconFilePath = CDEDITOR_RESOURCES_ROOT_PATH;
//iconFilePath += pFilePath;
//
//int width, height, originFormat;
//int depth = 32;
//int channels = STBI_rgb_alpha;
//void* pImageData = stbi_load(iconFilePath.c_str(), &width, &height, &originFormat, STBI_rgb_alpha);
//if (nullptr == pImageData)
//{
// return;
//}
//
//uint32_t maskR, maskG, maskB, maskA;
//if constexpr(SDL_BYTEORDER == SDL_BIG_ENDIAN)
//{
// maskR = 0xff000000;
// maskG = 0x00ff0000;
// maskB = 0x0000ff00;
// maskA = 0x000000ff;
//}
//else
//{
// maskR = 0x000000ff;
// maskG = 0x0000ff00;
// maskB = 0x00ff0000;
// maskA = 0xff000000;
//}
//
//SDL_Surface* pSDLSurface = SDL_CreateRGBSurfaceFrom(pImageData, width, height, depth,
// channels * width, maskR, maskG, maskB, maskA);
//
//SDL_SetWindowIcon(m_pSDLWindow, pSDLSurface);
//SDL_FreeSurface(pSDLSurface);
//stbi_image_free(pImageData);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

TODO

@T-rvw T-rvw added WIP Work In Progress Help Wanted and removed Draft DO NOT merge labels Oct 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Help Wanted WIP Work In Progress

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants