mirror of https://github.com/encounter/SDL.git
Fixed doxygen warning and markdown formatting.
Three backticks for blocks are not supported by doxygen.
This commit is contained in:
parent
0fbd904af8
commit
60df813042
|
@ -225,41 +225,39 @@ set this up:
|
||||||
source file, such as, "main.cpp".
|
source file, such as, "main.cpp".
|
||||||
6. click on the Add button. This will close the dialog, add the new file to
|
6. click on the Add button. This will close the dialog, add the new file to
|
||||||
your project, and open the file in Visual C++'s text editor.
|
your project, and open the file in Visual C++'s text editor.
|
||||||
7. Copy and paste the following code into the new file (minus the , then save
|
7. Copy and paste the following code into the new file, then save it.
|
||||||
it.
|
|
||||||
|
|
||||||
```
|
|
||||||
#include <SDL.h>
|
|
||||||
|
|
||||||
int main(int argc, char **argv)
|
#include <SDL.h>
|
||||||
{
|
|
||||||
SDL_DisplayMode mode;
|
|
||||||
SDL_Window * window = NULL;
|
|
||||||
SDL_Renderer * renderer = NULL;
|
|
||||||
SDL_Event evt;
|
|
||||||
|
|
||||||
if (SDL_Init(SDL_INIT_VIDEO) != 0) {
|
int main(int argc, char **argv)
|
||||||
return 1;
|
{
|
||||||
}
|
SDL_DisplayMode mode;
|
||||||
|
SDL_Window * window = NULL;
|
||||||
|
SDL_Renderer * renderer = NULL;
|
||||||
|
SDL_Event evt;
|
||||||
|
|
||||||
if (SDL_GetCurrentDisplayMode(0, &mode) != 0) {
|
if (SDL_Init(SDL_INIT_VIDEO) != 0) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
|
||||||
|
|
||||||
if (SDL_CreateWindowAndRenderer(mode.w, mode.h, SDL_WINDOW_FULLSCREEN, &window, &renderer) != 0) {
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
while (1) {
|
|
||||||
while (SDL_PollEvent(&evt)) {
|
|
||||||
}
|
}
|
||||||
|
|
||||||
SDL_SetRenderDrawColor(renderer, 0, 255, 0, 255);
|
if (SDL_GetCurrentDisplayMode(0, &mode) != 0) {
|
||||||
SDL_RenderClear(renderer);
|
return 1;
|
||||||
SDL_RenderPresent(renderer);
|
}
|
||||||
|
|
||||||
|
if (SDL_CreateWindowAndRenderer(mode.w, mode.h, SDL_WINDOW_FULLSCREEN, &window, &renderer) != 0) {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
while (1) {
|
||||||
|
while (SDL_PollEvent(&evt)) {
|
||||||
|
}
|
||||||
|
|
||||||
|
SDL_SetRenderDrawColor(renderer, 0, 255, 0, 255);
|
||||||
|
SDL_RenderClear(renderer);
|
||||||
|
SDL_RenderPresent(renderer);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
|
|
||||||
#### 6.B. Adding code and assets ####
|
#### 6.B. Adding code and assets ####
|
||||||
|
|
Loading…
Reference in New Issue